
Still using Windows 3.1? So why stick to SQL-92? A lot has changed in 30 years. We embrace the standard.
Vienna, Austria
Joined February 2015
- Tweets1.2K
- Following5
- Followers10.9K
- Likes167
xxHash, a very fast, non-cryptography hash, gains popularity.
Yesterdays MariaDB 13.1.2 GA brought has got some xxh functions:
modern-sql.com/caniuse/xxHas…
The SQL/JSON Path item-method .keyvalue() has an interesting history in the Oracle Database.
modern-sql.com/caniuse/keyva…
In 23.26.2 it works, but not in ?( filter ) context.
ORDER BY Has Come a Long Way
modern-sql.com/blog/2026-05/…
The ORDER BY clause is one of the best-known SQL clauses. Yet there are a number of common misunderstandings that are worth clearing up. The article walks you through the evolution of the ORDER BY clause in the SQL standard.
Order-equivalent OVER clauses
modern-sql.com/blog/2026-03/…
About an important but rarely appreciated aspect when using multiple OVER clauses in a single query.
SQL Comments, Please!
modern-sql.com/caniuse/comme…
Standard SQL offers two flairs of comments: one starts by two dashes (--) and goes to the end of the line. The other starts with slash-asterisk (/*) and ends with asterisk-slash (*/).
#SQL #DuckDB #PostgreSQL #MSSQL
Infinite Recursion Guards
modern-sql.com/caniuse/with_…
With recursive is the only SQL construct that is not guaranteed to terminate, eventually. As the DBMS is typically a very crucial system, infinite loops must be prevented at all times. See how various SQL systems help you.
The just released version 23.26.1 of the Oracle DB supports the FILTER clause.
modern-sql.com/feature/filte…
WITHOUT OVERLAPS Constraints
modern-sql.com/caniuse/witho…
New in PostreSQL 18. Since 9.2, EXCLUDE constraints can be used for the same purpose.
1
4
570
Adieu Apache Derby, Welcome DuckDB
modern-sql.com/blog/2025-12/…
GROUP BY ALL
Very popular, not yet standard but set to become standard. Also expected for PostgreSQL 19.
modern-sql.com/caniuse/group…
Just updated modern-sql.com and use-the-index-luke.com for MariaDB 11.7.
One enhancement is the FROM-clause column renaming, as described in this article: modern-sql.com/caniuse/E051-…
JSON support in SQL is not about storing JSON documents¹.
While storing JSON in SQL tables is possible and sometimes quite useful, the true power of JSON in SQL comes from the ability to *process* JSON within SQL.
Almost all of the timestamp related function-based indexes are unnecessary.
Example: For this
WHERE EXTRACT(YEAR FROM ts_col) = 2024
Someone might come up with that index:
CREATE INDEX … ON … (EXTRACT(YEAR FROM ts_col))
While it works it is better to re-write the query...
There is no such thing as a division by NULL exception in SQL.
Au contraire: Processing NULL values never causes an exception in SQL.
That’s why you can use NULL to prevent exceptions cause by bad data: Just map bad values to NULL before the sensitive operation takes place.
Example: division by zero
n / d
becomes
n / NULLIF(d, 0)
If d = 0, NULLIF returns NULL instead of the value of d. NULL just propagates through the division. No exception, just a NULL (unknown) result. NULLIF is very well supported, btw.
modern-sql.com/caniuse/nulli…
SQL's data types CHAR and VARCHAR are about characters. Sounds like a no-brainer, doesn't it?
Well, a consequence is that the number in the parenthesis refer to characters, not bytes.
Unfortunately, some SQL engines don't get that right—causing major confusion among users.
SQL's FILTER clause should be easy to implement for every engine. Why is it still not supported widely?
Sure it can be emulated easily—and ugly. The value on readability (and learning) is huge.
Please vendors: Just get it done.
modern-sql.com/feature/filte…
All charts on modern-sql.com are updated for PostgreSQL 17.
If you wonder what the new "BY SOURCE" option of MERGE does, here is my take: modern-sql.com/caniuse/merge…
And here we go
PostgreSQL 17 released
postgresql.org/about/news/po…
Are You Qualified To Use Null in SQL?
agentm.github.io/project-m36…
Take this quiz to find out.
Unfortunately, some of the questions go for implementation-defined behavior. Without knowing the engine, they cannot be answered correctly.
The ANY_VALUE functions comes to Db2 for i
Extra columns in a Select statement but not in the group by
rpgpgm.com/2024/09/extra-col…
The related article on modern-sql.com has a critique on it as well:
modern-sql.com/caniuse/any_v…
2
2
436
A typical source of confusion:
... NOT IN (NULL, …)
is never true.
modern-sql.com/concept/three…



