not in 里面的数据如果为空,不会统计进去,需要加上为空数据,比如 name not in ('tom','jack') or name is null这样来统计,如果不加name is null,那么name 为空的数据不会统计进去。
查询数据in,如果为空,必须声明一个值,入下面如果no2为空,则等于A
select uuid
from T1where (no1,decode(no2,'','A',no2)) in
(select no1,decode(no2,'','A',no2)
from TEMP_table a)