Top
Enterprise Postgres 17 SP1 Application Development Guide

10.4.3 NVL

Description

Returns a substitute value when a value is NULL.

Syntax
NVL(expr1, expr2)
General rules

Example

In the following example, "IS NULL" is returned if the value of col1 in table t1 is a NULL value.

SELECT col2, NVL(col1,'IS NULL') "nvl" FROM t1;
 col2 |   nvl
------+---------
 aaa  | IS NULL
(1 row)