Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Is the inner join communtative?

639840Oct 11 2012 — edited Oct 13 2012
My text book says that inner join is commutative: three tables A, B, C, so A join B join C equals A join C join B.

Below I have three tables and a query:
student(id, name, class_id)
class(class_id, teacher_id)
teacher(teacher_id, teach_name)

select * from student, class, teacher
where student.class_id=class.class_id and class.class_id=teacher.teacher_id


I inner join student table with class table, then with the teacher table. According to the communicativeness, I should be able to inner join student table with teacher table, then join the class table. But the student table and the teacher table do not have a common column, so they can not join. So is my text book wrong?

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 10 2012
Added on Oct 11 2012
10 comments
1,182 views