Table of ContentsPreviousNext

Database Migration


NVL

Syntax

NVL(expr1, expr2)

If expr1 is NULL, the function returns expr2. If expr1 is not NULL, the function returns expr1. The NVL function is usually used to replace NULL values with specified value.

Example

This example selects title and price for all books. If the price for a given title is NULL, the price shown is 0.00.

SELECT title, NVL(price, 0.00) AS price
FROM titles;

Equivalents in other databases

TABLE 72. Equivalents in other databases
IBM DB2
COALESCE function
Microsoft SQL Server
ISNULL and COALESCE functions


Ispirer Systems
http://www.ispirer.com
ispirer@ispirer.com
Table of ContentsPreviousNext