NVL

Purpose

This function replaces NULL values with the expression, expr2.

Syntax

nvl::=

Usage Notes

  • If expr1 is NULL, expr2 is returned, otherwise expr1 is returned.
  • The abbreviation NVL stands for "Null Value".
  • For additional information, see ZEROIFNULL.

Example

SELECT NVL(NULL, 'abc') NVL_1, NVL('xyz', 'abc') NVL_2;
Result
NVL_1 NVL_2
abc xyz