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

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -