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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Join SYntax

Author  Topic 

abc123
Starting Member

47 Posts

Posted - 2008-11-26 : 04:57:41
Hi,
I have some confusion on joins.
I have 3 tables tab1,tab2 and tab3.
here tab1 is join with tab2 abd tab2 is join with tab3.
so I have written following code

select ...
from tab1 join tab2
on tab1.col1 = tab2.col1
join tab3
on tab2.col1 = tab3.col1

Please tell me, whether it is correct or not.
tab3 will join with which table

raky
Aged Yak Warrior

767 Posts

Posted - 2008-11-26 : 05:05:49
the above one is correct and tab3 is joining with tab2
Go to Top of Page

abc123
Starting Member

47 Posts

Posted - 2008-11-26 : 05:07:38
thanks...
Go to Top of Page

raky
Aged Yak Warrior

767 Posts

Posted - 2008-11-26 : 05:10:10
welcome...
Go to Top of Page
   

- Advertisement -