select a.column1 as columna,a.column2 as columnb,b.column4 as columnc,c.column6 as columnd
from table1 a,table2 b ,table3 c
where a.column2=b.column3 and b.column3=c.column5
from table1 a,table2 b ,table3 c
where a.column2=b.column3 and b.column3=c.column5
table2.column4 columnc,table3.column6 columnd
from table1
left join table2 on table1.column2=table2.column3
left join table3 on table2.column3=table3.column5
where table1.column1='a'
as
begin
select a.column1,a.column2,b.column4,c.column6 from table1 a
left join table2 b on a.column2=b.column3
left join table3 c on a.column2=c.column5
where a.column1= @column
end