到底用哪个要看实际情况的吧,
------解决方案-------------------- 1.select * from a where not exists(select * from b where a.和B表关联的键值 = b.和A表关联的键值);
------解决方案-------------------- 数据量大 应该是用not exists
去掉重复数据 应数据库的伪列 rowid
------解决方案--------------------
1、肯定用not exists效率最高 2、DELETE FROM t1 b WHERE EXISTS (SELECT 1 FROM t1 a WHERE b.a1 = a.a1 GROUP BY a1 HAVING COUNT(a1) > 1 AND b.rowid <> MAX(a.rowi))