null【没有值,空值】
- 零和 null 是不一样的,null 表示空值,没有值,零表示一个确定的值
- null 不能参与如下运算:<>,!=,=
- null 可以参与如下运算:is,is not
- select * from emp where comm is null--输出奖金为空的员工信息
- select * from emp where comm is not null--输出奖金不为空的员工信息
- select * from emp where comm <> null--输出奖金为空的员工信息--error 输出为空
- select * from emp where comm != null--输出奖金为空的员工信息--error 输出为空
- 任何类型的数据都允许为 null
- 任何数值与 null 参与数学运算的结果都是 null