ifNull

Returns the result of checking for a non-NULL expression.

Syntax

ifNull(<type> expr a, <type> expr b)
  • a: expression evaluating to string, date or timestamp
  • b: expression evaluating to string, date or timestamp

    Returns

    string, date or timestamp

Description

Function ifNull returns the first expression a if it is not NULL. If the first expression is NULL, it returns the second, b. Expressions returning string, date or timestamp are allowed.