Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: Databricks SQL
Databricks Runtime
Returns NULL
if expr1
equals expr2
, or expr1
otherwise.
nullif(expr1, expr2)
expr1
: An expression of any type.expr2
: An expression of the same type asexpr
.
NULL
if expr1
equals to expr2
, or expr1
otherwise.
> SELECT nullif(2, 2);
NULL
> SELECT nullif(2, 3);
2