not in 子查询中出现null,查询无数据
select * from A where 列名 not in (select 列名 from B)
如果 子查询 B的列名有NULL值,则查询无效。 修改:
select * from A where 列名 not in (select isnull(列名,'') from B)
select * from A where 列名 not in (select 列名 from B)
如果 子查询 B的列名有NULL值,则查询无效。 修改:
select * from A where 列名 not in (select isnull(列名,'') from B)
共有 0 条评论