The NVL function lets you substitutes a non-value when a null value is encountered.
The syntax for the NVL function is:
NVL ( string1, replace_with )
string1 is the string to test for a null value.
replace_with is the value returned if string1 is null.
select NVL (supplier_city, ‘n/a’)
The SQL statement above would return ‘n/a’ if the supplier_city field contained a null value. Otherwise, it would return the supplier_city value.
NVL (supplier_desc, supplier_name)
This SQL statement would return the supplier_name field if the supplier_desc contained a null value. Otherwise, it would return the supplier_desc .
select NVL (commission, 0)
This SQL statement would return 0 if the commission field contained a null value. Otherwise, it would return the commission field.