Friday, 27 September 2013

Joining tables in SQL. Linking by column in the from clause

Joining tables in SQL. Linking by column in the from clause

Linking multiple tables,
Is there a chance I will output a different result if I call the column
names to be linked in a different order in the FROM clause?
For example:
SELECT *
FROM tbl1
JOIN tbl2 on tbl1.colX = tbl2.colX
JOIN tbl3 on tbl2.colY = tbl3.colY
To be clear, in the next block I call tbl2.colX whereas above I called
tbl1.colX
SELECT *
FROM tbl1
JOIN tbl2 on tbl2.colX = tbl1.colX
JOIN tbl3 on tbl2.colY = tbl3.colY

No comments:

Post a Comment