select * from B where (select count(1) as num from A where A.ID = B.ID) = 0 转载于:https://www.cnblogs.com/wdnnccey/p/7451512.html