Something like: select * from tab1 where address in (select address from tab2) select * from tab1 where address not in (select address from tab2)
Forum Rules