Table1
MarketID Employee ID
101 501
102 502
103 503
104 504
105 505
Table2
MarketID Employee ID
101 501
102 502
103 504
106 505
107 507
Expected Output:
MarketID Employee ID
103 503
104 504
105 505
I want to prepare a sql query to find exact full row data from table1 which are not available in Table2.

Alok pandey39 reputationPosted Aug 7, 2021, 2:33 AM EDT
Hi Rahul Kumar,
I think it will help you.
select t.* from Table1 as t where not exists(
select 1 from Table2 as t2
where t.marketId=t2.marketId and t.EmployeId=t2.EmployeeId)
Basem AlshabaniRank #3,323 · 432 reputationPosted Aug 7, 2021, 2:32 AM EDT
satheesh d190 reputationPosted Nov 9, 2021, 6:41 AM EST