求SQL语句写法:如果不为空,则为指定值

如题所述

select (case when isnull(字段名,'')<>'' then N'不为空时显示的内容' else N'为空时显示的内容' end)
from 表名

温馨提示:答案为网友推荐,仅供参考
相似回答