|
The recent question on JOINs at IAAI has me thinking - finally! some might say.
The order in which multiple joins are performed can affect the result. Joins can be nested within other joins. The order of processing for joins is generally from left to right, but based on the position of the required join-condition. Parentheses are recommended to make the order of nested joins more readable.
Here's the example:
For example: TB1 LEFT JOIN TB2 ON TB1.C1=TB2.C1 LEFT JOIN TB3 LEFT JOIN TB4 ON TB3.C1=TB4.C1 ON TB1.C1=TB3.C1
is the same as (TB1 LEFT JOIN TB2 ON TB1.C1=TB2.C1) LEFT JOIN (TB3 LEFT JOIN TB4 ON TB3.C1=TB4.C1) ON TB1.C1=TB3.C1
Hmm - verrrry eeenterrresting!
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.