AND
All functions > LOGICAL > AND
Returns true if both arguments are true.
Syntax
AND(expr1, expr2)
sql
Arguments
Parameter | Type | Required | Description |
---|---|---|---|
expr1 | BOOLEAN | Yes | First boolean expression |
expr2 | BOOLEAN | Yes | Second boolean expression |
Returns
TRUE if both expressions are TRUE, FALSE otherwise
Notes
- Logical AND operator for boolean expressions
- Returns TRUE only when both operands are TRUE
- Returns FALSE if either operand is FALSE
- NULL handling: Returns NULL if either operand is NULL and the other is TRUE
- Short-circuit evaluation may apply (expr2 not evaluated if expr1 is FALSE)
- Can be chained: expr1 AND expr2 AND expr3
- Commonly used in WHERE clauses and conditional logic