sql server :两个null不相等;ISNULL函数

null != null 
    例如:if (null = null) print 'it does' else print 'it does''t'  总是返回it does‘t
正确为:null is null
例外:唯一约束允许设置为 null 值。但是,如果允许为 null ,那么只能插入一个 null 。即 在唯一约束看来,两个 null 是相等的。
ISNULL 语法: ISNULL (<expression to test>,<replacement value if null>)
posted @ 2011-03-12 14:03  象牛  阅读(919)  评论(0编辑  收藏  举报