IS NULL and IS NOT NULL
The IS NULL
and IS NOT NULL
operators test whether or nota value is null (undefined).
Both operators work for all data types.
IS NULL
IS NULL
Using null
with IS NULL
evaluates to true:
Note that the example above casts null
as a bigint
since using an untyped null is not currently supported. The comparison result, however, is the same true regardless of the data type the null
is casted as.
For any value other than null
, IS NULL
evaluates to false :
IS NOT NULL
IS NOT NULL
The inverse of IS NULL
is IS NOT NULL
; thus, using null
with IS NOT NULL
evaluates to false:
For any value other than null
, IS NOT NULL
evaluates to true :
Last updated