mysql查询差集

select A.* from A left join B using(name,addr,age) where B.name is NULL;
select A.* from A left join B on A.id=B.Aid where ISNULL(B.name);

查询两个表中的差集,用ISNULL(),今天早上就遇到这样的问题,两个表都有一百多万数据,需要查询A、B表中,A表存在但B表不存在的数据。用了ISNULL()速度还行不卡。
使用如上

原文地址:https://www.cnblogs.com/walter371/p/4214184.html