Live preview
Every change to columns, conditions or limits instantly re-renders the formatted SQL below.
Pick a table, columns and WHERE conditions, add ORDER BY and LIMIT, and watch a properly formatted SELECT statement build itself below as you go.
This is a text generator only — nothing connects to a real database.
Every change to columns, conditions or limits instantly re-renders the formatted SQL below.
One click copies the full SELECT statement, indentation and all, ready to paste into your editor.
This builder only ever produces text — it never connects to or runs anything against a real database.
Build a SELECT statement piece by piece without memorizing clause order.
A SELECT statement is built from a handful of clauses that always appear in the same order: what to select, from where, which rows qualify, how to sort them, and how many to return. Understanding that order makes it much easier to read or write SQL by hand later.
Lists exactly which columns to return. An asterisk (*) returns every column, which is convenient for exploring but slower and less explicit in production queries.
Filters rows before they are returned. Each condition compares a column against a value using an operator like =, >, LIKE or IS NULL, joined by AND or OR.
Sorts the result set by one column, ascending (default, smallest first) or descending (largest first).
Caps how many rows come back, which is useful for pagination or simply previewing a large table without pulling every row.
Questions about how the generated query behaves.
No. This is a text generator only. It builds a formatted SELECT statement string from your choices; nothing is ever connected to or executed against a database.
Leave the column chip list empty, or use the default asterisk chip, and the generated query selects all columns with SELECT *.
The first WHERE row has no joiner. Every row after that has an AND or OR selector that connects it to the row above, and the generated query wraps the whole condition list in parentheses for clarity.
IS NULL and IS NOT NULL ignore the value field entirely, since they test whether a column has no value at all rather than comparing it to something.
No. The SQL text is generated locally in your browser as you type, and nothing is stored or transmitted.