In Oracle/PLSQL, the NVL function lets you substitute a value when a null value is encountered.
The syntax for the NVL function is:
NVL( string1, replace_with_if_null ) string1 is the string to test for a null value. replace_with is the value returned if string1 is null.
Both parameters of the function have to be of the same data type. You cannot use this function to replace a null integer by a string unless you call the TO_CHAR function on that value:
NVL(TO_CHAR(numeric_column), 'some string')
The source of this article is wikipedia, the free encyclopedia. The text of this article is licensed under the GFDL.