SQL WHERE Clause Builder
Pick a column, an operator, and a value — chain as many conditions as you need with AND/OR. The clause updates live and works with any SQL dialect.
Conditions
Generated WHERE clause
WHERE clause will appear here…How it works
A WHERE clause filters rows returned by a query. This builder assembles one condition at a time: choose the column being compared, the operator (equals, greater than, LIKE, IN, BETWEEN, or a NULL check), and the value to compare against. Text values are automatically quoted and single quotes inside them are escaped; numbers and booleans are left unquoted.
Add more conditions and choose whether each new one joins the clause with AND (all conditions must match) or OR(any condition may match). Incomplete rows are skipped automatically so the output stays valid while you're still typing.
Examples
Simple equality filter
Rows where a status column matches exactly.
WHERE status = 'active'
Range with BETWEEN
Rows where a numeric column falls in a range.
WHERE order_total BETWEEN 100 AND 500
Combining AND / OR
Multiple conditions chained together.
WHERE country = 'US' AND signup_date >= '2024-01-01' OR plan = 'enterprise'
Matching a list with IN
Rows where a column is one of several values.
WHERE role IN ('admin', 'owner', 'editor')