sql 查询字段如果为null 则返回0的写法

oracle
select nvl(字段名,0) from 表名;

-----------------------------------
sqlserver
select isnull(字段名,0) from 表名; 
原文地址:https://www.cnblogs.com/xiaonangua/p/10727914.html