SQL Linting in CI: Catch Bad SQL Before It Merges
By Sharon Ben-Moshe · Jul 13, 2026
SQL linting in CI catches syntax errors, keyword typos, and style drift before merge. Here's what it can catch, what it can't, and how to set it up.
Read postsqlfmt▍
sqlfmt blog
Practical posts on writing cleaner SQL and fixing the errors your database gives back.
By Sharon Ben-Moshe · Jul 13, 2026
SQL linting in CI catches syntax errors, keyword typos, and style drift before merge. Here's what it can catch, what it can't, and how to set it up.
Read postBy Sharon Ben-Moshe · Jul 13, 2026
SQL Server vs PostgreSQL syntax differences: TOP vs LIMIT, IDENTITY vs SERIAL, + vs || concatenation, GETDATE() vs NOW(), and more, with side-by-side SQL.
Read postBy Sharon Ben-Moshe · Jul 13, 2026
A SQL "ambiguous column name" error means a JOIN produced same-named columns and your query didn't say which one it meant. Here's the fix, dialect by dialect.
Read postBy Sharon Ben-Moshe · Jun 25, 2026
CTE vs subquery comes down to readability, reuse, and recursion. Here's when each one wins, plus the PostgreSQL optimization-fence gotcha you should know.
Read postBy Sharon Ben-Moshe · Jun 25, 2026
The MySQL vs PostgreSQL syntax differences that break migrations: auto-increment, quoting, string concat, upserts, and NULL functions — with side-by-side SQL.
Read postBy Sharon Ben-Moshe · Jun 25, 2026
Single quotes are for string values, double quotes are for identifiers — but MySQL, SQL Server, and BigQuery bend the rule. The full guide, with examples.
Read postBy Sharon Ben-Moshe · Jun 25, 2026
Window functions cram PARTITION BY, ORDER BY, and frames into one OVER clause. Here's how to format SQL window functions so the logic reads at a glance.
Read postBy Sharon Ben-Moshe · Jun 25, 2026
PostgreSQL's "column must appear in the GROUP BY clause" error (42803) fires when a SELECT column isn't grouped or aggregated. Three fixes, with examples.
Read postBy Sharon Ben-Moshe · Jun 21, 2026
SQL CTEs turn into a wall of text fast. Here's how to format WITH clauses, multi-CTE chains, and recursive CTEs so the structure reads at a glance.
Read postBy Sharon Ben-Moshe · Jun 15, 2026
Multi-join queries turn into walls of text fast. Here's how to format JOINs, ON conditions, and join chains so the query structure reads at a glance.
Read post