For AI agents: an index of this documentation is at https://developer.rippling.com/llms.txt. Public pages have a Markdown version at the same URL with .md added.

Skip to main content
index

IFNULL() Function

Use with AI:Rippling AI ChatGPT Claude Cursor

Description​

Returns the first non-null value — expression when it is not NULL, otherwise fallback.

Syntax​

IFNULL(expression, fallback)

Parameters​

ParameterDescriptionData TypeRequired
expressionValue to return when it is not NULLAnyYes
fallbackValue to return when expression is NULLAnyYes

Notes​

  • Behaves like COALESCE(expression, fallback); parser normalizes to COALESCE.

Example​

SELECT
IFNULL(NULL, 'fallback')
FROM
my_table t
LIMIT
1;