Link Search Menu Expand Document


Compares two expressions. Returns NULL if the expressions are equal. Returns the result of <expression1> if they are not equal. To return <expression2> instead, use IFNULL.


NULLIF(<expression1>, <expression2>)


Parameter Description Supported input types
<expression1>, <expression2> Expressions that evaluate to any data type that Firebolt supports Any

Return Types

Returns NULL if expressions are equal. Returns the data type of <expression1> if values are not equal.


This example below highlights an instance where NULL would be returned:

NULLIF('Level 3','Level 3')

Returns: NULL

This example returns <expression1> because the values are not equal:

NULLIF('Level4','level 4')

Returns: Level4