NULL predicate

Tests for null values.

Syntax

value_expression IS [ NOT ] NULL

Parameters

value_expression

A column name, literal, or function.

Examples

Column name:

=> SELECT date_key FROM date_dimension WHERE date_key IS NOT NULL;
 date_key 
----------
        1
      366
     1462
     1097
        2
        3
        6
        7
        8
...

Function:

=> SELECT MAX(household_id) IS NULL FROM customer_dimension;
 ?column? 
----------
 f
(1 row)

Literal:

=> SELECT 'a' IS NOT NULL;
 ?column? 
----------
 t
(1 row)