SQL之千奇百怪

1. not in 失效

现象:where字句中使用了not in (select field1...) 理应由上千条记录,实际记录为0.

原因:not in 中有null值,导致not in失效。

解决:修改语句为not in (select field1...where field1 is not null)

原文地址:https://www.cnblogs.com/zhoujie0710/p/15767512.html