select * from t1 where not exists (subQuery)判断subQuery是否结果为空,为空返回true.
select * from t1 where id not in(subQuery)判断’‘subQuery=id’’,当subQuery的结果中含有null时,任何值和null比永远返回false.当subQuery含有null时,not in永远返回的是false,也就不会返回任何结果集.
not exists和not in
最新推荐文章于 2024-04-27 08:43:32 发布