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 pandeyPosted Aug 7, 2021, 6:33 AM
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)
satheesh dPosted Nov 9, 2021, 11:41 AM
Basem AlshabaniPosted Aug 7, 2021, 6:32 AM