sql server - left/right join -
i got 2 tables this:
c1 1 1 2 , table 2 c1 c2 1 x 1 y 2 y
and want result is:
c1 c2 1 x 2 null
i don't want see y need see 2 other information.
with left join shows null 1 , right join 2 wont show.
try this, assuming column names match table names:
select c1.c1, c2.c2 c1 left join c2 on c2.c1 = c1.c1 , c2.c2 <> 'y'
i'm not sure whether actual requirement. may tell more details you're trying achieve.
Comments
Post a Comment