发布于2020年2月28日 由txlMYSQL查询 存在一个表而不在另一个表中的数据 select distinct A.ID from A where A.ID not in (select ID from B)select A.ID from A left join B on A.ID=B.ID where B.ID is nullselect * from A where (select count(*) from B where A.ID = B.ID) = 0; 以上是存在A表,但是不存在B表的数据