Skip to content
100% local

SQL table and column extractor

List every table, join and column a SQL query reads, grouped by clause.

Input
Output

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.

FAQ

Does it run or validate the SQL?
No. It reads the query as text to find table, join and column references — it never executes anything against a database, so it works even on SQL you don't currently have a connection for.
How does it know which table a column belongs to?
It builds an alias map from the FROM and JOIN clauses, so "o.id" resolves to "orders" if the query has "FROM orders o". A bare column with no prefix is assigned to the only table in scope, or flagged as ambiguous when there is more than one.
Does it support JOINs, CTEs and subqueries?
Yes. Every JOIN type is recognized with its condition, a WITH clause is broken out as a named CTE with the tables it reads, and a subquery in the FROM clause is listed as a derived table rather than a real one.
Can I paste more than one query at once?
Yes. Separate statements with semicolons and each one is numbered and analyzed independently. A statement that is not a SELECT query is noted rather than misread.
Is my SQL uploaded anywhere?
No. Parsing runs entirely in your browser — your query, including any real table and column names, never leaves your device.