Try OpenEdge Now
skip to main content
SQL Reference
SQL Reference : OpenEdge SQL Functions : NVL
 

NVL

Returns the value of the first expression if the first expression value is not NULL. If the first expression value is NULL, the value of the second expression is returned.

Syntax

NVL ( expression , expression )

Notes

*The NVL function is not ODBC compatible. Use the IFNULL function when ODBC‑compatible syntax is required.
*The first argument to the function can be of any type.
*The type of the second argument must be compatible with that of the first argument.
*The type of the result is the same as the first argument.

Example

This example illustrates the NVL function:
SELECT salary + NVL (comm, 0) 'TOTAL SALARY' FROM employee ;

Compatibility

Progress extension