← All text tools

SQL Query Builder

Describe your tables, then build a SELECT with up to two joins, filters, grouping, ordering and a row limit from form fields, written for your database.

  • Free
  • No sign-up
  • Works on any device

About SQL Query Builder

Describe your tables once, one per line, for example users(id, name, email) and orders(id, user_id, total), then build a SELECT from fields instead of typing joins from memory. Choose the main table, the columns to show, up to two joins with the join type and the matching columns, conditions such as orders.total >= 100, grouping, HAVING, ordering and a row limit. The query is written for PostgreSQL, MySQL, SQL Server, SQLite or Oracle, with TOP, LIMIT or FETCH FIRST as the database needs, and column names are checked against your definition.

How to use SQL Query Builder

  1. List your tables and columns in the first box, one table per line.
  2. Choose the main table, the columns to show and, if you need them, a first and second join with their join columns.
  3. Add conditions, grouping and ordering, then copy the query. Warnings point out unknown columns and unsupported joins.

Why use this tool?

Also known as

Frequently asked questions

How do I write the conditions?

One per line as column operator value, for example orders.status in (paid, shipped) or users.name like A%. Text values are quoted for you, and the operators are = <> < > <= >= like, in, between and is null.

Which join type should I choose?

INNER keeps only rows with a match on both sides. LEFT keeps every row of the main table, with NULLs where there is no match. The join visualizer on this site shows the difference with sample data.

Why is there a warning about FULL JOIN?

MySQL has no FULL JOIN and SQLite supports it only from version 3.39. The tool still writes the query and tells you to combine a LEFT and a RIGHT join with UNION where it is missing.

Is SQL Query Builder free?

Yes. SQL Query Builder on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.