SQL Query Builder
Build a SELECT query visually — no SQL knowledge needed. Fill in the fields below and the finished query appears instantly. It only writes the SQL text; it does not connect to any database.
Tip: numbers stay unquoted; text values are quoted and escaped automatically. IS NULL and IS NOT NULL need no value.
Example queries
- All orders from one customer, newest first:
SELECT * FROM orders WHERE customer_id = 42 ORDER BY created_at DESC LIMIT 50; - Distinct active product names containing "phone":
SELECT DISTINCT name FROM products WHERE name LIKE '%phone%' AND status = 'active';
Frequently Asked Questions (FAQ)
What does the SQL Query Builder do?
It builds a SELECT statement visually: you fill in the table name, columns, WHERE filters, sorting and a row limit, and the tool writes the SQL for you.
Does it connect to a database?
No. It only builds the SQL text in your browser. Copy the result and run it in your own database tool.
How are text values quoted?
Text values are wrapped in single quotes automatically, and any single quote inside a value is escaped by doubling it.
What does the Validate button check?
Basic sanity checks: a non-empty table name, a positive whole-number LIMIT and similar issues. It does not run the query against a database.