when i executed below query seperate they are displaying all the records and when i union these queries they are unable to display all the records........ .
select 'deleted', m.col1,v.col2,m .col3 from MasterData m right join VendorData v on m.a=v.b where xyz in null
union
select 'new record',m.col1, v.col2,m.col3 from MasterData m left join VendorData v on m.a=v.b where xyz is null
select 'deleted', m.col1,v.col2,m .col3 from MasterData m right join VendorData v on m.a=v.b where xyz in null
union
select 'new record',m.col1, v.col2,m.col3 from MasterData m left join VendorData v on m.a=v.b where xyz is null
Comment