1. not in的结果集中出现null则查询结果为null;
select * from device where code not in ('A', 'B', null);
上面查询结果为 null,查不出想要的结果
2、in的结果集中出现null不影响;
select * from device where code in ('A', 'B', null);
不影响,可查询出想要的结果
1. not in的结果集中出现null则查询结果为null;
select * from device where code not in ('A', 'B', null);
上面查询结果为 null,查不出想要的结果
2、in的结果集中出现null不影响;
select * from device where code in ('A', 'B', null);
不影响,可查询出想要的结果