SQL Sandbox
Plan one SQL statement without executing it: the verb, table, columns, predicate, limit, and whether the statement writes rows.
What the SQL Sandbox does
The statement is minified first (comments removed, quoted text preserved), then its verb is read. SELECT reports the column list and any LIMIT, INSERT reports the column list it writes, UPDATE reports the columns it sets, and DELETE reports only its table and predicate.
A statement outside those four verbs is refused by name — including DDL — because reporting DROP TABLE as a plan would suggest this page had weighed it.
The parse is structural, not semantic: a predicate is reported as the text between WHERE and the end, and is not checked against a schema. Subqueries, joins and CTEs are reported as part of the column or predicate text, not analysed.
How to use it
Paste one statement into the SQL statement box, or press Run with the example already there.
Read the Statement plan below: the verb, the table, the columns and whether the statement writes rows.
Check a statement you were unsure about — the Executed line always says nothing was run.
Worked example
Input:
select id, name from users where id = 5 limit 10
Output:
Statement: SELECT
Table: users
Columns: id, name
Predicate: id = 5
Limit: 10
Shapes: reads rows
Executed: nothing — this page plans a statement and runs none.
Why it runs in your browser
The result is produced on this page with JavaScript, so it works offline after the page loads and nothing you enter is sent anywhere.
A statement read for what it would do — table, columns, predicate, limit and whether it writes — with no connection opened and nothing executed.
The page reports the shape of the statement; it is a planner, not a sandbox with a database behind it, and it says so on every run.
What it does, and what it does not
The statement is minified first (comments removed, quoted text preserved), then its verb is read. SELECT reports the column list and any LIMIT, INSERT reports the column list it writes, UPDATE reports the columns it sets, and DELETE reports only its table and predicate.
A statement outside those four verbs is refused by name — including DDL — because reporting `DROP TABLE` as a plan would suggest this page had weighed it.
The parse is structural, not semantic: a predicate is reported as the text between WHERE and the end, and is not checked against a schema. Subqueries, joins and CTEs are reported as part of the column or predicate text, not analysed.
How to use SQL Sandbox
Paste one statement into the SQL statement box, or press Run with the example already there.
Read the Statement plan below: the verb, the table, the columns and whether the statement writes rows.
Check a statement you were unsure about — the Executed line always says nothing was run.
What to Expect
Best for
- Seeing which table and columns a statement touches
- Confirming a statement writes rows before running it
Not ideal for
- Validating SQL against a schema
- Executing anything, which this page never does
What this tool keeps
- The column list and predicate as written
- The write/read verdict
What may need cleanup
- A join is reported as text, not analysed
- A subquery needs reading by hand
Common errors
- The page refuses it: this page plans SELECT, INSERT, UPDATE and DELETE; found "drop"
Example use cases
- Reviewing a statement from a migration
- Teaching what a statement touches
Sample input
SQL statement: select id, name from users where id = 5 limit 10
Sample output
Statement plan: Statement: SELECT …
Who this is for
- Developers reviewing SQL before running it
- Anyone reading a statement they inherited
Frequently asked questions
Does it execute the statement?
No. The page opens no connection and runs nothing; it reads the statement's shape and prints it. The Executed line says so on every result.
Why is DDL refused?
Reporting DROP TABLE as a plan implies the page evaluated it. It plans the four data verbs instead and names the verb it found.
Is the predicate validated?
No. It is reported as the text you wrote. Checking it needs a schema, which this page does not have.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.