Learn SQL/Beginner/Filtering Data/SQL Logical Operators

SQL Logical Operators

AND, OR, and NOT, side by side — the three ways to combine or flip conditions.

What & Why

Every filtering condition beyond a single comparison is built from these three: AND (every condition must hold), OR (at least one must hold), NOT (flip a condition's truth value).

See How It Works

REFERENCE EXAMPLE
OperatorRow survives when...
ANDevery condition is true
ORat least one condition is true
NOTthe wrapped condition is false

The result uses the same Queryflo columns shown in the worked example.

Beginner business practice

Sign up free to try it on a real business scenario