sql server - SQL Join multiple tables using where clause -
i want write sql statement:
select * table1 inner join table2 t2 on inner join table3 t3 on inner join table4 t4 on fk_client_id = 4
all tables have client id in common. not sure on on
.
will on t2.fk_client_id = ......
not sure.
so want data tables has fk_client_id in common.
select *, (select fk_client_id table2 fk_client_id = t1.fk_client_id )as tid1, (select fk_client_id table3 fk_client_id = t1.fk_client_id )as tid2, (select fk_client_id table4 fk_client_id = t1.fk_client_id )as tid3 table1 t1
Comments
Post a Comment