I've been googling for quite a while trying to find information on this but i'm having no luck.
What I'm trying to find out is when joining 3+ tables together how can you explicitly specify the order in which the joins are applied? I understand that the basic order is "FROM" then "WHERE" then "HAVING". I've also read that the query optimizer does a bit of work. but if I have a more complex join e.g.:
table1 inner join table2 on t1.a = t2.a inner join table3 on t2.b = t3.b inner join table4 on t4.a = t1.a
(so here I'm joining table1 to table2, then table2 to table3, and then table4 to table1.)
what exactly specifys the order in which these tables are joined? Does it just join the tables in order I've referenced the table? Or perhaps the order of the "ON" clauses? What about if I did this:
table1 inner join (table2 inner join table3 on t2.b = t3.b) on t1.a = t2.a inner join table4 on t4.a = t1.a
would the parenthes make any difference whatsoever?
If someone could explain or point me in the direction of some documentation on this then I'd be very grateful.