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
| Parameter | Type | Required | Description |
|---|---|---|---|
expr1 | BOOLEAN | Yes | First boolean expression |
expr2 | BOOLEAN | Yes | Second 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
On this page