I have two tables, T1 and T2, which have some records in common. I am trying to find out which records are shared between the two. Just to clarify, the 'msg' is unique to each record.
T1 has ~1.4 million records. When I run
select count(*) from T1 where msg in (select msg from T2)
I get ~950,000 records. Ok, 950k out of 1.4 million. There should be around 450k records that show up when I run the inverse right? Query below:
select count(*) from T1 where msg not in (select msg from T2)
This query actually returns 0. How is that possible? Furthermore when I run
select count(*) from T1 where id not in (select id from T2)
I get about 1100 records, so there are obviously some records in T1 which aren't in T2.
What am I missing? Any help is greatly appreciated.