Skip to main content
Version: current [25.x]

Conditional

Function NameDescription
BOOL_ANDComputes the boolean AND of two boolean expressions. Returns TRUE if both expressions evaluate to TRUE. Returns FALSE if one or both expression(s) evaluate(s) to FALSE.
BOOL_ORComputes the boolean OR of two boolean expressions. Returns TRUE if one or both expressions evaluate to TRUE. Returns FALSE if both expressions evaluate to FALSE.
CASEEvaluates a list of conditions and returns the first resulting true expression. If a true expression is not found, will return the ELSE statement, if present, or else will return NULL.
COALESCEEvaluates the arguments in order and returns the value of the first expression that does not contain NULL.
GREATESTReturns the largest value from a list of expressions.
LEASTReturns the smallest value from a list of expressions.
NULLIFCompares two expressions. If the values in each expression are equal, returns NULL and, if they are not equal, returns the value of the first expression.
NVLReturns the value of the first expression, if it is not NULL. Otherwise, returns the value of the second expression.