Syntax
NVL(str1,replace_with)
Purpose
Replaces a NULL value with a specified value. If str1 is NULL, the NVL function returns the value specified by replace_with. str1 is typically the name of a column. replace_with can be a hard-coded value, a reference to another column, or an expression.
This ability to automatically replace NULL values can provide more complete output.
Examples
obclient> SELECT NVL(NULL, 0), NVL(NULL, 'a');
+--------------+----------------+
| NVL(NULL, 0) | NVL(NULL, 'a') |
+--------------+----------------+
| 0 | a |
+--------------+----------------+
1 row in set
