Skip to main content

Module conditional

Module conditional 

Source

Functions§

coalesce
COALESCE(val1, val2, …) - Return first non-NULL value
greatest
GREATEST(val1, val2, …) - Return greatest value
if_fn
IF(condition, true_value, false_value)
ifnull
IFNULL(expr, alt_value) - Return alt_value if expr is NULL
isnull
ISNULL(expr) - Check if value is NULL
least
LEAST(val1, val2, …) - Return smallest value
nullif
NULLIF(expr1, expr2) - Return NULL if expr1 == expr2, otherwise expr1