空值处理

l数据库中,一个列如果没有指定值,那么值就为null,这个null和C#中的null,数据库中的null表示“不知道”,而不是表示没有。因此select null+1结果是null,因为“不知道”加1的结果还是“不知道”。
lselect * from score where english = null ;
lselect * from score where english != null ;都没有任何返回结果,因为数据库也“不知道”。
lSQL中使用is null、is not null来进行空值判断: select * from score where english is null ; select * from score where english is not null ;
lISNULL ( check_expression , replacement_value )
重来没有接触过,零基础学习软件编程,一个字累
原文地址:https://www.cnblogs.com/hsha/p/4591262.html