OR

All functions > LOGICAL > OR

Returns TRUE if at least one argument is true.

Signatures

Returns: TRUE if at least one expression is TRUE, FALSE otherwise

OR(expr1: BOOLEAN, expr2: BOOLEAN) → BOOLEAN
sql
ParameterTypeRequiredDescription
expr1BOOLEANYesFirst boolean expression
expr2BOOLEANYesSecond boolean expression

Notes

  • Logical OR operator for boolean expressions
  • Returns TRUE if either or both operands are TRUE
  • Returns FALSE only when both operands are FALSE
  • NULL handling: Returns NULL if both operands are NULL, or one is NULL and the other is FALSE
  • Short-circuit evaluation may apply (expr2 not evaluated if expr1 is TRUE)
  • Can be chained: expr1 OR expr2 OR expr3
  • Commonly used in WHERE clauses for alternative conditions

See also

Last update at: 2026/03/03 16:47:38
Last updated: 2026-03-03 16:48:19