介绍
emp表中很多员工的comm字段值为 NULL
不能使用 = 号判断
要查询 comm 为NULL 的记录,不能使用 comm = NULL,如下:
select * from emp where comm = NULL;
用 is 判断
而应该用 is null:
select * from emp where comm is null
查询 comm 不为空 的信息,如下:
select * from emp where comm is not null