空值处理函数:
isnull(expression,value):如果expression不为空就返回expression,否则返回value
select isnull(name,'xx') as name from emp;
case函数用法1:
单值判断,相当于swith case
case exp
when val1 then return val1
when val2 then return val2
else default return val
end
应用:行变列