可能原因:B表中存在NULL值
例子:
1、查不出数据
not in
select name from a where name not in (select distinct name from b )
not exists
select name from a where not exists (select distinct name from b )
2、更改后查出数据
not in
select name from a where name not in (select distinct name from b where name is not null)
not exists
select name from a where not exists (select distinct name from b where name is not null)