ORACLE内置函数NVL,NVL2, NULLIF

1.NVL (expr1, expr2)->expr1为NULL,返回expr2;不为NULL,返回expr1。注意两者的类型要一致。
2.NVL2 (expr1, expr2, expr3) ->expr1不为NULL,返回expr2;为NULL,返回expr3。expr2和expr3类型不同的话,expr3会转换为expr2的类型。
3.NULLIF (expr1, expr2) ->相等返回NULL,不等返回expr1。

你可能感兴趣的:(oracle)