有兩個(gè)表t1和t2躁锁,表中只有一個(gè)字段c1咽瓷。
求兩個(gè)表的差召烂。即存在于t1串塑,但不存在于t2中的記錄沼琉。
select c1 from t1 where c1 not in (select c1 from t2)
select c1 from t1 where not exists(select * from t2 where t1.c1=t2.c1)
select t1.c1 from t1 left join t2 on t1.c1=t2.c1 where t2.c1 is null