I have two tables and I want to get all records from one table that are different from the records in second table.
Eg.: if we have four records in the first table like A,B,C,D and three records in the second table thats A,B,C then the answer of query should be D.
I have tried "EXCEPT" operator but it doesn't work fine. Kindly help me in writing correct query for the given problem.
How about:
select * from TABLE_A where (COL,COL2,..) not in (select COL1,COL2,.. from TABLE_B)
union all
select * from TABLE_B where (COL1,COL2,..) not in (select COL1,COL2,.. from TABLE_A);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With