Link to home
Start Free TrialLog in
Avatar of singsunn
singsunn

asked on

sql server, database

I need to join 3 tables A, B, C  inner join A and B on ID and some other conditions. Then the result should be joined with C on the same id . but with C its a left outer join on the id. any suggestions?
Avatar of Sharath S
Sharath S
Flag of United States of America image


try this.
select *
  from A
  join B on A.id = B.id -- add your other conditions
  left join C on A.id = C.id

Open in new window

maybe this

select * from
(
select a.*, b.some other columns from a inner join b on a.id=b.id and ...
) x left join c on x.id=c.id
ASKER CERTIFIED SOLUTION
Avatar of Ephraim Wangoya
Ephraim Wangoya
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial