SQL Query Analyzer
Analyse SQL structure: each statement's type, the referenced tables, joins, whether it filters with WHERE and how many parameters it binds, locally in your browser.
- Runs locally in your browser
- No upload required
Try it
Supported formats
Privacy
Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.
Analysed 1 statement(s); 2 table reference(s) and 1 join(s).
How it works
- Split the script into top-level statements.
- Classified each statement and collected FROM/JOIN/INTO/UPDATE table names.
- Counted joins, detected WHERE and counted parameters.
- Table names are lexical references, not resolved schema objects.
Methodology
- Split the script into top-level statements.
- For each statement, read the leading keyword to classify it and scan for FROM/JOIN/INTO/UPDATE to collect table names.
- Count JOIN keywords, detect a WHERE clause and count parameter tokens.
Usage
- Paste a SQL statement or script.
- Choose the dialect.
- Run the analyzer and read the per-statement breakdown.
Examples
These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.
A join with a filter
{
"text": "select a.id, b.name from a join b on a.id = b.id where a.id = ?;",
"dialect": "postgresql"
}An insert
{
"text": "insert into audit_log (id, event) values ($1, $2);",
"dialect": "postgresql"
}Two statements
{
"text": "update t set x = 1 where id = 2; delete from t where id = 3;",
"dialect": "mysql"
}Limitations
A quick map of a query
Before reviewing or refactoring a query it helps to know which tables it touches, whether it filters and how it joins. The analyzer reports exactly those structural facts and nothing it cannot see.
Frequently asked questions
- Does it validate the query?
- No. It describes the structure. Use the SQL Validator for delimiter and keyword checks.
- Why does a table name look odd?
- The analyzer reads the token after FROM/JOIN/INTO/UPDATE; it does not resolve schema qualifiers or aliases.
- Is my query uploaded?
- No. Analysis happens entirely in your browser.
Sources
- ISO/IEC 9075-1:2023: Information technology, Database languages SQL — ISO/IEC
- PostgreSQL Documentation: SQL Syntax, Lexical Structure — PostgreSQL Global Development Group
- MySQL 8.0 Reference Manual: String Literals — Oracle
- SQLite Documentation: SQL Syntax — SQLite Consortium
- Microsoft Learn: Transact-SQL Syntax Conventions — Microsoft
Send feedback
Tell us if this tool helped, report a problem, or suggest a tool. Only the message you type is sent — never the input you used in the tool.
Was this tool useful?
Prefer to write to us directly? See the contact page.