NVL(exp1,exp2)函数时判断判断某个值是否为null。若为null,则返回exp2,否则返回exp1
---格式1
select nvl(exp1,exp2) from db_table
---例子
select monthid,decode(nvl(sale,6000),6000,"NG","OK") from db_table
NVL(exp1,exp2,exp3)函数时判断判断某个值是否为null。若为null,则返回exp3,否则返回exp2
---格式2
select nvl(exp1,exp2) from db_table
---例子
select monthid,decode(nvl(sale,6000,"sale为null"),6000,"NG","OK") from db_table