ISNULL

Returns the value of the first non-null expression in the list.

ISNULL is an alias of NVL.

Behavior Type

Immutable

Syntax

ISNULL ( expression1 , expression2 );

Parameters

Notes

Examples

SELECT product_description, product_price, 
ISNULL(product_cost, 0.0) AS cost 
FROM product_dimension;
      product_description       | product_price | cost 
--------------------------------+---------------+------
 Brand #59957 wheat bread       |           405 |  207
 Brand #59052 blueberry muffins |           211 |  140
 Brand #59004 english muffins   |           399 |  240
 Brand #53222 wheat bread       |           323 |   94
 Brand #52951 croissants        |           367 |  121
 Brand #50658 croissants        |           100 |   94
 Brand #49398 white bread       |           318 |   25
 Brand #46099 wheat bread       |           242 |    3
 Brand #45283 wheat bread       |           111 |  105
 Brand #43503 jelly donuts      |           259 |   19
(10 rows)