NVL(exp1,exp2)函數時判斷判斷某個值是否為null。若為null,則返回exp2,否則返回exp1 格式1 select nvl(exp1,exp2) from db_table 例子 select monthid,decode(nvl(sale,6000),6000,'NG','OK' ...
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