Jay Pete
SSCommitted
Points: 1945
More actions
September 15, 2010 at 1:41 pm
#97334
Can i join more than two table with left or right outer join...?
Is that possible..?if yes...?just tell me ..how is that?
WayneS
SSC Guru
Points: 95460
September 15, 2010 at 1:50 pm
#1221652
Yes.
select t1.*
from dbo.table1 t1
LEFT JOIN dbo.table2 t2
ON t1.col1 = t2.col1
LEFT JOIN dbo.table3 t3
ON t2.col2 = t3.col1
LEFT JOIN dbo.table4 t4
ON t3.col2 = t4.col1
etc.
WayneMicrosoft Certified Master: SQL Server 2008Author - SQL Server T-SQL Recipes
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply