NVL2 Function

Returns the second argument when the first argument is not NULL. If the first argument is NULL, the third argument is returned.

Read syntax diagramSkip visual syntax diagram
NVL2 Function

|--NVL2--(--expression--,--result-expression--,--else-expression--)--|

The NVL2 function is a synonym for the following code:

CASE WHEN expression IS NOT NULL
     THEN result-expression
     ELSE else-expression

Copyright© 2021 HCL Technologies Limited