Hi @Shambhu Rai
Matched:
;with T1 as(
select * from table1
INTERSECT
select * from table2)
select * from T1
union all
select * from T1;
Output:
Un Matched:
;with T1 as(
select * from table1
except
select * from table2
),T2 as(
select * from table2
except
select * from table1)
select * from T1
union all
select * from T2;
Output:
Best regards,
Percy Tang
If the answer is the right solution, please click "Accept Answer". If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.