Mysql 对比两张表数据


Mysql 对比两张表数据

1
2
3
SELECT * FROM A a WHERE NOT EXISTS (SELECT 1 FROM b B WHERE a.id = b.id);

SELECT * FROM A a WHERE a.id NOT IN (SELECT b.ID FROM B b);