如何将空值NULL替换为其他文字
例如
a b c
-----------------------
11 11 null
22 22 22
33 33 null
12 12 32要求显示
a b c
-----------------------
11 11 不存在
22 22 22
33 33 不存在
12 12 32
该如何写SQL语句 谢谢各位大虾
例如
a b c
-----------------------
11 11 null
22 22 22
33 33 null
12 12 32要求显示
a b c
-----------------------
11 11 不存在
22 22 22
33 33 不存在
12 12 32
该如何写SQL语句 谢谢各位大虾
a b c
-----------------------
11 11 null
22 null 22
33 33 null
12 null 32要求显示
a b c
-----------------------
11 11 不存在
22 不存在 22
33 33 不存在
12 不存在 32
when num is NULL then '不存在'
else num
end as num
from dbo.a
(case when c is null then '不存在' else rtrim(c) end)c
from 表名