普通的值可以进行"="操作,例如条件中一般都会这样出现:sUserName='张三',如果sUserName的值为null,要想找出所 有名字为null的记录时,不能这样用:sUserName=null,因为null不是一个具体的值,任何值与它比较时都会返回false.此时可借用 is null 或者是is not null.
示例查询:
1:select * from testNull where a=null --返回空结果集
2:select * from testNull where b is null --返回结果集 2 2 NULL
结论:说明null是不能用"="来比较,可用is null来替换