AND
logical AND
What changes
- Input
- two boolean expressions
- Output or change
- TRUE/FALSE/UNKNOWN
Syntax at a glance
boolean_expression AND boolean_expression
Work example
A report needs AND to define which rows satisfy a compound search condition.
Test a match, a nonmatch, and NULL. Write the expected TRUE, FALSE, or UNKNOWN result before running the filter.
Check your work AND. The rows kept by AND are exactly those whose complete condition evaluates to TRUE.
Practice SQL
Open in SQL FlowSELECT Value FROM (VALUES (1), (2), (NULL)) AS Items(Value) WHERE Value >= 1 AND Value <= 2;
Open Microsoft Learn for full syntax, permissions, and details for your version.