SQL Explainer
SQL query explainer online. Break a SELECT, INSERT, UPDATE, or DELETE into clauses in plain English. Free SQL explainer in your browser.
SQL
0 lines · 0 chars
Loading editor...
Features
- Plain-English walkthrough of SELECT, INSERT, UPDATE, DELETE
- Calls out FROM, JOIN, WHERE, GROUP BY, HAVING, ORDER BY, LIMIT
- Warns when UPDATE or DELETE has no WHERE
- Handles multiple statements separated by semicolons
- Leaves string literals untouched so quotes stay honest
- Nothing is uploaded
Common Use Cases
- Read a query you inherited before you change it
- Explain a JOIN-heavy report to a teammate
- Spot a missing WHERE on DELETE
- Document what a scheduled job SQL does
Clause order is not execution order
SQL is written SELECT ... FROM ... WHERE ... GROUP BY ..., but engines typically think FROM/JOIN, then WHERE, then GROUP BY, then SELECT. This explainer follows the text you pasted so it matches what you see, and labels each clause.
It is not EXPLAIN ANALYZE. There are no row counts or indexes. Nested subqueries inside parentheses are treated as part of their parent clause.
Examples
Valid - Filtered select
SELECT id FROM users WHERE active = TRUE ORDER BY id LIMIT 10; Valid - Dangerous delete
DELETE FROM users;Frequently Asked Questions
Can this replace EXPLAIN?
No. EXPLAIN shows the plan your database picked. This page only names the clauses in the SQL text.
Does it understand window functions?
OVER (...) stays inside the SELECT list. You will see it in the select-list step, not as a separate execution engine.
Tips
- Format the query first if it is one long line. The explainer still works, but you will want the pretty version too.
- A DELETE or UPDATE without WHERE is called out on purpose.