oracle 查询语句把结果中的NULL值转换为0
select case when 字段1 is null then '0' else 字段1 end as 字段1 from dual
使用case when
case when
字段 is null then 0
end 字段名
decode(字段,null,0)
NVL(Expr1,Expr2)如果Expr1为NULL,返回Expr2的值,否则返回Expr1的值
例如:select NVL(SUM(MONEY) ,0) from tb全都在NVL这儿起作用