SQL COALESCE vs ISNULL: Key Differences
By Sharon Ben-Moshe · Aug 26, 2026
Compare SQL COALESCE and ISNULL: argument count, portability, return types, nullability, evaluation behavior, and the MySQL naming trap.
Read postsqlfmt▍
Category
How SQL syntax and behavior differ across PostgreSQL, MySQL, SQLite, SQL Server, and BigQuery.
27 posts
By Sharon Ben-Moshe · Aug 26, 2026
Compare SQL COALESCE and ISNULL: argument count, portability, return types, nullability, evaluation behavior, and the MySQL naming trap.
Read postBy Sharon Ben-Moshe · Aug 26, 2026
Learn SQL ROW_NUMBER with practical examples for numbering rows, latest-row-per-group queries, tie-breaking, and when RANK is the better choice.
Read postBy Sharon Ben-Moshe · Aug 26, 2026
Calculate date differences in SQL Server, MySQL, PostgreSQL, SQLite, and BigQuery. Learn syntax, argument order, timestamp behavior, and boundary rules.
Read postBy Sharon Ben-Moshe · Aug 26, 2026
Learn SQL FULL OUTER JOIN results, syntax across databases, NULL handling, and a MySQL workaround using LEFT JOIN, RIGHT JOIN, and UNION ALL.
Read postBy Sharon Ben-Moshe · Aug 21, 2026
Use SQL LIKE for text patterns without accidental matches. Learn %, _, literal wildcard escaping, case sensitivity, and portable examples.
Read postBy Sharon Ben-Moshe · Aug 21, 2026
CAST turns one SQL data type into another. Learn when CONVERT differs, how invalid values fail, and how to write portable conversions.
Read postBy Sharon Ben-Moshe · Aug 21, 2026
Concatenate SQL strings with || or CONCAT, but NULL behavior differs by database. See portable patterns for PostgreSQL, MySQL, SQL Server, and BigQuery.
Read postBy Sharon Ben-Moshe · Aug 21, 2026
Use BigQuery UNNEST to flatten arrays into rows. Learn CROSS JOIN, LEFT JOIN, WITH OFFSET, aliases, and how to avoid duplicate surprises.
Read postBy Sharon Ben-Moshe · Aug 21, 2026
Use PostgreSQL ILIKE for case-insensitive pattern matching. Learn wildcards, locale behavior, indexes, alternatives, and safer search examples.
Read postBy Sharon Ben-Moshe · Aug 21, 2026
INTERSECT returns shared query rows; EXCEPT returns rows in the first query but not the second. Learn set-operator rules, duplicates, and dialect caveats.
Read postBy Sharon Ben-Moshe · Aug 16, 2026
Use BigQuery QUALIFY to filter window-function results without an outer subquery. Learn evaluation order, top-N-per-group patterns, and portability.
Read postBy Sharon Ben-Moshe · Aug 16, 2026
GROUP BY collapses rows; window functions retain detail and add calculations beside it. See when each approach fits, with clear SQL examples.
Read postBy Sharon Ben-Moshe · Aug 16, 2026
UNION removes duplicate rows; UNION ALL keeps every row. Learn compatibility rules, ordering scope, and how to choose the correct set operator.
Read postBy Sharon Ben-Moshe · Aug 16, 2026
WHERE filters rows before aggregation; HAVING filters grouped results. Learn where each clause belongs with a practical sales-report example.
Read postBy Sharon Ben-Moshe · Aug 16, 2026
INNER JOIN keeps matches; LEFT JOIN also retains unmatched left rows. See the result difference, the WHERE-clause trap, and safe examples.
Read postBy Sharon Ben-Moshe · Aug 16, 2026
EXISTS checks for matching rows; IN compares against a list. Learn the practical differences, the NOT IN NULL trap, and when to use each.
Read postBy Sharon Ben-Moshe · Aug 16, 2026
COUNT(*) counts rows; COUNT(column) skips NULLs. See the exact difference, join behavior, COUNT(DISTINCT), and reliable SQL examples.
Read postBy Sharon Ben-Moshe · Aug 8, 2026
Every major SQL dialect can insert-or-update in one statement, but the syntax is different everywhere — ON CONFLICT, ON DUPLICATE KEY UPDATE, INSERT OR REPLACE, and MERGE all solve the same problem in incompatible ways.
Read postBy Sharon Ben-Moshe · Aug 8, 2026
“Add 7 days” is DATEADD in SQL Server, DATE_ADD in MySQL and BigQuery, a raw interval in PostgreSQL, and a modifier string in SQLite — the same operation, four unrelated shapes. Here's the working syntax for each dialect's core date functions.
Read postBy Sharon Ben-Moshe · Aug 2, 2026
PostgreSQL, MySQL, and SQLite page results with LIMIT. SQL Server uses TOP or OFFSET-FETCH. BigQuery uses standard LIMIT/OFFSET. Here's how the syntax — and the gotchas — differ.
Read postBy Sharon Ben-Moshe · Aug 2, 2026
COALESCE, ISNULL, and IFNULL all claim to "handle NULLs" — but they aren't portable, and one of them means something completely different in MySQL than it does in SQL Server. Here's the dialect-by-dialect breakdown.
Read postBy Sharon Ben-Moshe · Jul 13, 2026
SQLite vs PostgreSQL syntax differences that break migrations: dynamic typing, AUTOINCREMENT vs SERIAL/IDENTITY, JOIN support, dates, and ALTER TABLE.
Read postBy Sharon Ben-Moshe · Jul 13, 2026
BigQuery SQL differs from Postgres and SQL Server in quoting, types, keys, and cost. Here is the syntax map you need before porting your first query.
Read postBy Sharon Ben-Moshe · Jul 13, 2026
Reserved words like ORDER, GROUP, and USER silently break SQL queries used as column names. See which words are reserved per dialect and how to quote them.
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 · 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 post