在数据库里经常会遇到空处理下面是一些处理空字符的东西
sqlserver
>isnull(a,b); a为NULL 返回b ,a不为NULL返回a
>coalease(exp [,..n])
实现
case when(exp1 is not null) then exp1
when (exp2 is not null) then exp2
...
else expn
end
即 coalease(exp1,exp2,exp3..expn)
>nullif(exp1,exp2) 相等返回null,不相等返回exp1
mysql --ifnull(a,b) 同 mssql isnull()
access--iff(exp,n1,n2) exp为真n1,假返回n2
声明本博客文章未特殊注明均为原创,转载请注明作者和原地址。
博客地址:http://www.cnblogs.com/gw2010/
博客首发:http://www.zhou2019.cn