IFNULL

functionsupportedCore SQL functions

docs.snowflake.com ↗

Conditional expression functions

If expr1 is NULL, returns expr2, otherwise returns expr1. Aliases: NVL

Syntax

IFNULL( <expr1> , <expr2> )

Parameters

NameRequiredDescription
expr1requiredA general expression.
expr2requiredA general expression.

Returns

Returns the data type of the returned expression. If both expressions are NULL, returns NULL.

Usage notes

Collation details

- The collation specifications of all input arguments must be compatible. - The collation of the result of the function is the highest-precedence collation of the inputs.