SQL 合集

1.判断两个关联的表中,一个表中的值,对应的在另一个表中为空

1)
select *from A where id not in (select id from B)
2)
select A.* from A LEFT JOIN B ON A.id = B.ID WHERE B.ID IS NULL
原文地址:https://www.cnblogs.com/ms-grf/p/9081692.html