When using not in, not like, <>, not between in sql, you should pay attention, if the field is permit to null, the null value record can not be selected, you should add not null to let the null record shown. But the not exists is the except, it can select the null record, because the sql is always not exists(select field1 from table1 where table1.field1=table2.field1), if it table2's field1 is null, of course the equation is not true.[@more@]
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/545828/viewspace-1007035/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/545828/viewspace-1007035/