OR
All functions > LOGICAL > OR
Returns true if at least one argument is true.
Syntax
OR(expr1, expr2)
sql
Arguments
Parameter | Type | Required | Description |
---|---|---|---|
expr1 | BOOLEAN | Yes | First boolean expression |
expr2 | BOOLEAN | Yes | Second boolean expression |
Returns
TRUE if at least one expression is TRUE, FALSE otherwise
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