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
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