AND

All functions > LOGICAL > AND

Returns true if both arguments are true.

Syntax

AND(expr1, expr2)
sql

Arguments

ParameterTypeRequiredDescription
expr1BOOLEANYesFirst boolean expression
expr2BOOLEANYesSecond 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

See also

Last update at: 2025/10/13 10:23:46