1.NVL函數
從兩個表達式返回一個非 null 值。 語法 NVL(eExpression1, eExpression2) 參數 eExpression1, eExpression2 如果 eExpression1 的計算結果為 null 值,則 NVL( ) 返回 eExpression2。如果 eExpression1 的計算結果不是 null 值,則返回 eExpression1。eExpression1 和 eExpression2 可以是任意一種數據類型。如果 eExpression1 與 eExpression2 的結果皆為 null 值,則 NVL( ) 返回 .NULL.。 返回值類型 字符型、日期型、日期時間型、數值型、貨幣型、邏輯型或 null 值
2.NVL2函數
語法NVL(eExpression0, eExpression1,eExpression2) 參數 eExpression0,eExpression1, eExpression2 如果 eExpression0 的計算結果為 null 值,則 NVL( ) 返回 eExpression2。如果 eExpression0 的計算結果不是 null 值,則返回 eExpression1。eExpression1和eExpression2類型不同的話,eExpression2會轉換為eExpression1的類型 返回值類型 字符型、日期型、日期時間型、數值型、貨幣型、邏輯型或 null 值 3.nullif
NULLIF (expr1, expr2) expr1與expr2相等返回NULL,不等則返回expr1 注意類型要一致 4.decode
decode (expression, search_1, result_1, search_2, result_2, ., search_n, result_n, default)
decode函數比較表達式和搜索字,如果匹配,返回結果;如果不匹配,返回default值;如果未定義default值,則返回空值。