SQL Query Generator
Enter the table, columns and conditions; you’ll end up with a readable query that’s ready for review.
Workspace · SQL Query Generator
Consulta generada
SELECT id, nombre, email
FROM clientes
WHERE activo = 1
ORDER BY nombre ASC
LIMIT 20;La herramienta solo genera texto. Revisa siempre la consulta antes de ejecutarla en tu base de datos y usa consultas parametrizadas en producción.
How to use it
Select the type of query and enter the name of the table.
Specify the columns and, depending on the type, the values, the WHERE clause or the ORDER BY clause.
Check the query that has been generated and copy it into your SQL client.
Examples
List
SELECT id, name, email FROM customers WHERE active = 1.
Registration
INSERT INTO customers (name, email) VALUES ('Ana', 'ana@example.com').
Update
UPDATE customers SET active = 0 WHERE id = 7.
What you need to know
The generator checks that the table and columns use a secure identifier format. Values in INSERT and UPDATE statements are automatically enclosed in quotation marks to prevent unescaped quotation marks.
It does not execute the query or connect to a database. In production, it uses parameterised queries rather than concatenating generated values.
Frequently Asked Questions
Related tools
Other tools that can help with similar tasks.
JSON formatter and validator
Formats, validates and organises JSON with error detection.
CSV to JSON Converter
Converts a CSV table into a ready-to-use JSON array.
Fake data generator
Generate sample names, email addresses, telephone numbers and addresses in CSV or JSON format.
