数据库里的空处理

在数据库里经常会遇到空处理下面是一些处理空字符的东西
 
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
原文地址:https://www.cnblogs.com/gw2010/p/3158912.html