Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
evaaseow
Starting Member
1 Post |
Posted - 2007-08-22 : 10:31:23
|
| Hi All, i've been trying to get back into the SQL world after being away for quite sometime.I was wondering about multiple table joins and how joins work from the background.Select *FROMtable1 LEFT OUTER JOINON table1.field = table2.fieldtable2 INNER JOINON table1.field = table3.fieldtable3 INNER JOINON table3.field = table4.fieldtable4From the example i have a couple of questions. 1) Does it matter which order the tables/joins appear 2) When matching fields does it matter which order they appear?3) How does the field matching work with respect to linking tables?Thank You. |
|
|
mwjdavidson
Aged Yak Warrior
735 Posts |
Posted - 2007-08-22 : 11:39:10
|
| [code]Select *FROMtable1 LEFT OUTER JOIN table2ON table1.field = table2.fieldINNER JOIN table3ON table1.field = table3.fieldINNER JOIN table4ON table3.field = table4.field[/code]1. No 2. No (but be consistent)3. Huh!?Mark |
 |
|
|
|
|
|