sql - How to select rows using outer join -
i have 2 a1 , a2 tables wit single column.
a b - - 1 3 2 4 3 5 4 6
i need select records not in b. tried select [a1] left outer join a2 c on a.[a]=c.[b]
select 1
, 2
more 1 time, want unique results only, want 1 , 2 only
. refereed few links outer join not able understand fully. know silly question new joins.
what not in
combined distinct
you're not getting duplicates
select distinct a1 not in (select b a2)
Comments
Post a Comment