null值與任意值比較時都為fasle
not in 、"!="、"not like"條件過濾都會過濾掉null值的數據
SELECT * from temp;
SELECT * from temp where score not in (70);
?
?返回null解決方法:
SELECT * from temp where score not in (70) or score is null;SELECT * from temp where score IFNULL(score,'') != 70;