NVL2(表达式1,表达式2,表达式3)
如果表达式1为空,返回值为表达式3的值。如果表达式1不为空,返回值为表达式2的值
例如 NVL2(comm,'sal+comm',sal)
NVL2函数测试comm
如果comm为空,就返回sal 的值。如果 comm 不为空(null),就返回表达式 sal+comm的值。
NVL2(表达式1,表达式2,表达式3)
如果表达式1为空,返回值为表达式3的值。如果表达式1不为空,返回值为表达式2的值
例如 NVL2(comm,'sal+comm',sal)
NVL2函数测试comm
如果comm为空,就返回sal 的值。如果 comm 不为空(null),就返回表达式 sal+comm的值。