sql isnull函数使用

isnull函数

描述:如果A不为空,使用A,否则,使用B

select case when A is not null then A else B end as '结果' from table

isnull(A,B)可实现,表示 如果A为空的话用B代替

sql语句:

select isnull(A,B) as '结果' from table

posted on 2016-03-07 13:47  haoxiwang001  阅读(116)  评论(0编辑  收藏  举报

导航