SQL table and column extractor
List every table, join and column a SQL query reads, grouped by clause.
SQL table and column extractor
Paste a SQL SELECT query and this tool reads back exactly what it touches: which tables it queries, how those tables are joined, and which columns come from the SELECT list, the WHERE clause, GROUP BY and ORDER BY. It is built for the moment you inherit a report query, a slow endpoint, or someone else's migration and need to know its real footprint before you change anything, without pasting it into a database console.
Table aliases are resolved automatically, so "o.total" in a query that opens with "FROM orders o" is reported against the real table name, not the single-letter alias. Each JOIN is listed with its type — inner, left, right, full, cross, or an old-style comma join — alongside its ON condition or USING list, so the shape of the query is visible at a glance. Turn off "Show WHERE / GROUP BY / ORDER BY columns" to see only what is selected, or switch the output between a clause-by-clause overview and a flat dependency list better suited to documenting what a query relies on.
Common table expressions (WITH …) and subqueries in the FROM clause are recognized too: a CTE is listed with the tables its own body reads from, and a derived table shows up as a subquery rather than a phantom table name. When a query joins two or more tables and a column has no table prefix, the tool cannot know which table it belongs to — with "Warn about columns without a table" on, that column is flagged instead of silently guessed at. Paste several statements separated by semicolons and each one is numbered and analyzed on its own; anything that isn't a SELECT query is noted and skipped rather than misread.
This is a text-pattern reader, not a database connection: it never executes the SQL and the query never leaves your browser, so production queries with real table and column names are safe to paste. Copy the report, download it as a .txt file, or send it to another tool's input.