Is the inner join communtative?
639840Oct 11 2012 — edited Oct 13 2012My 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.