Mysql 用Not In 的问题:子查询的结果中有Null则查不出来。
这个时候要有子查询中加条件 is not null
select * from A where a.code not in (select DISTINCT B.code from B where B.code is not null) ;
Mysql 用Not In 的问题:子查询的结果中有Null则查不出来。
这个时候要有子查询中加条件 is not null
select * from A where a.code not in (select DISTINCT B.code from B where B.code is not null) ;