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,也就不会返回任何结果集.
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,也就不会返回任何结果集.