28 compile-time checks—8 errors and 20 warnings—that catch silent SQL bugs before they reach your database.
DBQC is a Database Query Compiler; query safety is one part of the compiler's job. It turns structured query definitions into validated SQL, resolving dependencies, schemas, parameters, and dialect syntax for PostgreSQL, MySQL, SQLite, DuckDB, and—with DBQC Pro—Oracle, SQL Server, and DB2.
These checks move repeatable mistakes earlier: an error stops compilation, while a warning makes a risky choice visible in the editor, local development, and CI. That means the database team can spend less time finding preventable query problems and more time on schema design, performance, reliability, and the decisions that require expertise. The checks add feedback before execution; they do not replace database planning or runtime control.
The comparison below shows where DBQC detects each issue relative to the broad categories of tools that claim to validate queries.
Tool category
Checks
DBQC
28
ORMs
0–3
SQL Linters
0
IDE Plugins
2–4
DB Runtime
3–5
Null & Three-Valued Logic
Check
DBQC
ORMs
Linters
IDEs
DB Runtime
= NULL / != NULL — always UNKNOWN, use IS NULL
ERR
—
—
—
—
NOT IN with nullable subquery — silently returns zero rows
WARN
—
—
—
—
Join Issues
Check
DBQC
ORMs
Linters
IDEs
DB Runtime
Cartesian join (no predicate) — cross product of all rows
WARN
—
—
—
—
LEFT JOIN nullified by WHERE — silently converts to INNER
WARN
—
—
—
—
Unused join source — joined table never referenced
WARN
—
—
—
—
JOIN ON type mismatch — kills index, MySQL VARCHAR=0 matches all
WARN
—
—
~
—
Aggregation & GROUP BY
Check
DBQC
ORMs
Linters
IDEs
DB Runtime
Ungrouped column in aggregate — MySQL picks random row
ERR
—
—
~
~
Aggregate function in WHERE — use HAVING instead
ERR
—
—
Yes
Yes
Window Functions
Check
DBQC
ORMs
Linters
IDEs
DB Runtime
Window function in WHERE — needs wrapping subquery
ERR
—
—
Yes
Yes
Window without ORDER BY — nondeterministic results
ERR = Blocks compilation with actionable error message
WARN = Surfaced alongside successful/failed result
Yes = Caught by this tool category
~ = Partial detection (some engines, some cases)
— = Not detected
Methodology
130 SQL gotchas collected from 80+ published sources (erikdarling.com, red-gate.com, modern-sql.com, brentozar.com, blog.jooq.org, use-the-index-luke.com, SQL Antipatterns by Bill Karwin, and others). Each was evaluated for static detectability from query AST + schema metadata alone. DBQC implements every check that is feasible without runtime data.
"DB Runtime" means the database engine itself rejects the query — but only at execution time, after deployment, with an unhelpful error message. DBQC catches it before compilation completes, with an actionable fix suggestion.