Read a query's statements, the tables it touches and the placeholders it expects, and catch an UPDATE or DELETE with no WHERE before it ever runs.
Waiting for a query
Double quotes around identifiers, '' to escape a quote inside a string, and ? placeholders. The common subset every database below also understands.
The report appears here
Statements, the tables they touch, the placeholders they expect, and anything worth catching first.
SQL Inspector runs entirely on your device — no database is contacted.
You’re on the Free plan. Compare plans
Reads a query and reports what is in it: how many statements, which kind each one is, which tables they touch, which placeholders they expect, and where the comments are.
Two findings are worth the tool on their own. The first is an UPDATE or DELETE with no WHERE clause — a statement that affects every row in the table. Sometimes that is exactly what you meant. When it is not, this is the moment to find out, and it is the one SQL mistake that is both easy to make and impossible to undo.
The second is a query that mixes placeholder styles — :name in one place and $1 in another. Most database drivers accept exactly one style, so a query containing two usually means a string was concatenated into it somewhere. That is the shape of a SQL injection bug, and it is visible from the query alone.
The tool is explicit about which of its answers are exact and which are best-effort. Statement counts, placeholders, comments and token counts are facts about the token stream and cannot be wrong unless the tokenizer is. Table references are read from the names following FROM, JOIN, INTO and UPDATE — right for ordinary queries, and foolable by heavy nesting or unusual syntax. They are labelled as a strong hint rather than a guarantee.
Names defined by a WITH clause are separated from real tables. A common-table expression looks exactly like a table in the FROM clause, and reporting one as a table sends somebody looking through a schema for something that only exists inside the query.
No. Nothing connects to a database, no schema is fetched and nothing is executed. The query is read as text in your browser and never leaves it.
Reliable for ordinary queries and best-effort beyond them. Names are read from what follows FROM, JOIN, INTO and UPDATE, which heavy nesting or unusual syntax can confuse. The page labels it as a hint rather than a guarantee, which is the honest description.
Because they are names defined by a WITH clause in this query rather than tables in your database. They look identical in a FROM clause, so separating them stops you searching a schema for something that only exists inside the query.
Because an UPDATE or DELETE without one affects every row in the table, and it is the one SQL mistake that is both easy to make and impossible to undo. If it was deliberate, the warning costs you a glance.
Most drivers accept exactly one style, so a query containing two usually means part of it was built by string concatenation. That is the shape SQL injection takes, and it is visible from the query without knowing anything about the code around it.
No. It reads tokens, not grammar. A query can produce a complete report here and still be rejected by the database.