SELECT 'A' as 'NotIn',* from tableB ; WHERE NOT exist ; (select * from tableA WHERE tableA.CommonField=tableB.CommonField) ; union ; SELECT 'B' as 'NotIn',* from tableA ; WHERE NOT exist ; (select * from tableB WHERE tableA.CommonField=tableB.CommonField)Cetin