Training
Module
Learn coding practices to help prevent the occurrence of NullReferenceException.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
is null
operatorApplies to: Databricks SQL
Databricks Runtime
Tests whether expr
is NULL
.
expr is [not] null
expr
: An expression of any type.A BOOLEAN
.
If not
is specified this operator is a synonym for isnotnull(expr)
.
Otherwise the operator is a synonym for isnull(expr)
.
If expr
is a VARIANT
result of a:
parse_json
function,variant_explode
table-valued function, orvariant_explode_outer
table-valued functionthe result of is null
is always false
.
Use the is_variant_null
function function to check if the VARIANT
encoded value is NULL
, or cast the VARIANT
to a specific type and check if the result is NULL
.
> SELECT 1 is null;
false
> SELECT 1 is not null;
true
Training
Module
Learn coding practices to help prevent the occurrence of NullReferenceException.