Générateur de Requêtes SQL

Visually build SELECT, INSERT, UPDATE and DELETE queries

100 % gratuit. Fonctionne entièrement dans votre navigateur : vos fichiers et données ne quittent jamais votre appareil et rien n'est envoyé à un serveur.

searchSELECT query on table users
Generated SQL

À propos de cet outil

Building a query through a form rather than typing it removes the syntax errors and, more usefully, the structural ones. SQL's clause order is fixed - SELECT, FROM, JOIN, WHERE, GROUP BY, HAVING, ORDER BY - and getting it wrong is a parse error you notice immediately. What you do not notice immediately is a condition placed in the wrong clause. A filter that belongs in a JOIN's ON but ends up in WHERE silently converts a LEFT JOIN into an INNER JOIN, dropping every row that had no match. Similarly, a WHERE that should have been a HAVING filters before grouping rather than after, which changes the answer rather than failing. A builder that knows where each piece goes prevents both. The one it cannot prevent is the dangerous one: an UPDATE or DELETE with no WHERE clause affects every row in the table. Always check that before running anything. Queries are built in your browser.

Comment utiliser cet outil

  1. Choose the operationSELECT to read, INSERT to add, UPDATE to change, DELETE to remove.
  2. Pick the table and columnsNaming columns explicitly is better practice than SELECT * in anything you will keep.
  3. Add your conditionsEach condition goes into the correct clause automatically, which is what prevents the subtle bugs.
  4. Check the WHERE before running an UPDATE or DELETEWithout one, the statement affects every row. Run it as a SELECT first to see what it would touch.

Pourquoi l’utiliser

  • Places each condition in the correct clause, avoiding the JOIN and HAVING mistakes that change results silently.
  • Produces standard SQL that works across MySQL, PostgreSQL and SQL Server.
  • Useful for learning, because you see the SQL your choices produce.
  • Runs in your browser - table and column names are never transmitted.
  • No account and no limit.

Usages courants

  • Assembling a query quickly without looking up clause order.
  • Building a multi-condition WHERE clause without bracket mistakes.
  • Generating an INSERT or UPDATE template to adapt.
  • Learning SQL structure by seeing form choices become syntax.
  • Producing a starting query to hand to someone else to refine.

Conseils pour de meilleurs résultats

  • Always run an UPDATE or DELETE as a SELECT first with the same WHERE clause. That shows you exactly which rows it would affect.
  • Name your columns rather than using SELECT *. It is faster, and it does not break when someone adds a column.
  • Use HAVING for conditions on aggregates and WHERE for conditions on rows - swapping them changes the result without erroring.
  • Format the finished query with the SQL Formatter before saving it anywhere, so the structure stays readable.
  • Wrap OR conditions in parentheses. Operator precedence rarely does what an unbracketed OR looks like it should.

Erreurs à éviter

  • Running an UPDATE or DELETE without a WHERE clause, which modifies every row in the table.
  • Putting a filter in WHERE when it belonged in a JOIN's ON, which turns a LEFT JOIN into an INNER JOIN and drops rows.
  • Using WHERE where HAVING was needed, filtering before grouping instead of after.
  • Leaving OR conditions unbracketed, so precedence produces a different query than intended.
  • Running generated SQL against production without checking it on a copy first.

Questions fréquentes

Basic familiarity helps, but the visual builder is designed to reduce how much raw syntax you need to remember - you're selecting options and filling in fields rather than typing a full query by hand.

The generated SQL follows standard, widely-compatible syntax that works across most common databases (MySQL, PostgreSQL, SQL Server) - highly database-specific features would need manual adjustment for your particular system.

Yes - it is plain text. The builder gets you a correct structure quickly; refining it by hand afterwards is the normal workflow.

It affects every row in the table, and in most databases there is no undo. Always run the same statement as a SELECT with that WHERE clause first - if it returns more rows than you expected, you have just avoided a serious problem.

Almost certainly a condition on the joined table placed in WHERE rather than in the JOIN's ON clause. WHERE filters after the join, discarding the NULL rows a LEFT JOIN was supposed to keep - so it silently becomes an inner join.

No. The query is built in your browser, so table names, column names and any values you enter stay on your device.

Yes. SQL Query Generator is free for normal use with no account required, and ToolBox does not add a watermark to your result.

Most tools in this category run in your browser so the file stays on your device. If a tool needs a temporary server job, files are handled for that job only and are not kept as a lasting archive.

Les gens recherchent aussi

  • sql query builder online
  • generate sql select statement
  • visual sql builder free
  • sql query generator no login
  • where vs having sql
  • left join not working
  • build sql without coding

Related guides