What's New in SQL
SQL keeps changing: the standard adds features every few years, and each database ships new versions with new syntax, types and tools. This lesson is a snapshot of the most useful recent changes, checked against each project's official release announcements in November 2026. It's the one lesson in this course that will go out of date fastest, so treat it as a map of what to look for, and read your own database's release notes before relying on a feature. We'll try the PostgreSQL 18 features in Try it, which runs PostgreSQL 18.7, and describe the rest.
In One Minute
- SQL:2023 standardized property graph queries (SQL/PGQ), a
JSONtype,ANY_VALUE,GREATEST/LEASTand more. - PostgreSQL 18 (September 2025):
uuidv7(),OLDandNEWinRETURNING, virtual generated columns by default, temporal keys, faster I/O. - PostgreSQL 19 (November 19, 2026):
REPACKto shrink tables online,ON CONFLICT DO SELECT, JSON output fromCOPY, replicating sequences. - MySQL 9.7 is the new long-term support line (April 2026); MySQL 8.0 reached end of life.
- SQL Server 2025: a native
JSONtype, regular expression functions and aVECTORtype. - Oracle AI Database 26ai replaced 23ai, keeping its
BOOLEANtype,IF NOT EXISTSand SQL/PGQ. - Vector search for AI is the trend almost every database has added.
The Standard: SQL:2023
SQL:2023 is the current edition of ISO/IEC 9075 (The SQL Standard and Dialects). Its main additions:
| Feature | What it does |
|---|---|
| SQL/PGQ (Part 16) | Query tables as a graph of nodes and edges with GRAPH_TABLE and MATCH patterns, such as "students who share a mentor" |
JSON data type | A real type for JSON, beyond the JSON functions of SQL:2016 |
ANY_VALUE() | Return any one value from a group when you know they're all the same |
GREATEST, LEAST, LPAD, RPAD | Long-standing extensions, now standard |
UNIQUE NULLS DISTINCT / NULLS NOT DISTINCT | Choose whether NULLs count as duplicates in a unique constraint |
| Number literals | Underscores (1_000_000) and hexadecimal, octal and binary forms (0x1F) |
Databases adopt these at their own pace. PostgreSQL already supports ANY_VALUE, NULLS NOT DISTINCT and the new number literals; Oracle AI Database 26ai supports SQL/PGQ.
PostgreSQL 18
PostgreSQL 18 came out in September 2025 and is the version Try it runs. Some changes you can see directly:
-- Time-ordered UUIDs: good primary keys that index well
SELECT uuidv7() IS NOT NULL AS has_uuidv7;
-- RETURNING can show the row before and after an UPDATE
UPDATE courses
SET fee_usd = fee_usd + 25
WHERE course_id = 4
RETURNING old.fee_usd AS old_fee, new.fee_usd AS new_fee; has_uuidv7
------------
t
(1 row)
old_fee | new_fee
---------+---------
400.00 | 425.00
(1 row)Explanation: uuidv7() generates UUIDs that start with a timestamp, so new ids sort roughly in creation order and stay friendly to B-tree indexes, unlike fully random version 4 UUIDs (Choosing Keys). RETURNING old.fee_usd, new.fee_usd reports both values in the same statement: SQL Basics went from $400.00 to $425.00. Before version 18, RETURNING could only show the new values.
| PostgreSQL 18 change | Why it matters |
|---|---|
| Asynchronous I/O | Reads from disk can overlap, speeding up scans and VACUUM on many systems |
| Virtual generated columns, now the default | Computed when read, taking no space (Generated Columns and Domains); add STORED to keep the old behavior |
Temporal constraints: WITHOUT OVERLAPS, PERIOD | A key such as (course_id, valid WITHOUT OVERLAPS) stops two fee periods for one course overlapping |
| B-tree skip scan | A multicolumn index can help even when the query doesn't filter on its first column (Index Design) |
NOT NULL ... NOT VALID | Add a not-null rule to a big table without a long scan, then validate later (Schema Migrations) |
| Statistics kept across major upgrades | Queries plan well right after pg_upgrade |
| OAuth sign-in, md5 passwords deprecated | Use SCRAM passwords or single sign-on |
PostgreSQL 19
PostgreSQL 19 was released on November 19, 2026, and will be supported until November 2031. This course's examples run on 18, and everything here works on 19 too. Highlights from the release announcement:
| PostgreSQL 19 change | What it does |
|---|---|
REPACK and REPACK (CONCURRENTLY) | Rebuilds a bloated table to give space back, without blocking reads and writes in the concurrent form; replaces VACUUM FULL and CLUSTER, which still work (Troubleshooting a Database) |
INSERT ... ON CONFLICT DO SELECT | Returns the existing row when an insert conflicts, instead of doing nothing or updating it (Upsert and MERGE) |
COPY ... TO with JSON output | Export rows as JSON directly |
| Logical replication of sequences | Sequence values follow the data, which helps major-version upgrades by replication |
WAIT FOR LSN | Lets an app wait until a standby has caught up, for read-your-writes on replicas (Replication and Scaling) |
pg_plan_advice | Records and pins planner choices, such as join order, to keep important plans stable |
| Changed defaults | JIT compilation is off by default; md5 passwords now raise a warning; RADIUS sign-in was removed |
MySQL
MySQL now ships two kinds of releases: long-term support (LTS) lines, which get only fixes, and Innovation releases, which add features more often.
| Release | Notes |
|---|---|
| MySQL 8.0 | Reached end of life in April 2026; upgrade to 8.4 or 9.7 |
| MySQL 8.4 LTS | The previous long-term line, still supported |
| MySQL 9.7 LTS (April 2026) | The new long-term line, collecting features from the 9.x Innovation releases, such as the VECTOR type |
| Innovation releases | Now numbered by date, starting with 26.7 (July 2026) |
SQL Server 2025
SQL Server 2025 reached general availability in November 2025. The changes most visible in SQL:
| Feature | What it does |
|---|---|
Native JSON type and JSON index | Stores JSON in an efficient binary form instead of text in NVARCHAR |
| Regular expression functions | REGEXP_LIKE, REGEXP_REPLACE, REGEXP_SUBSTR and others, long available in PostgreSQL, MySQL and Oracle |
VECTOR type and vector search | Store embeddings and find the most similar rows, with an approximate vector index |
| Optimized locking | Fewer lock conflicts and less lock memory for concurrent updates |
REGEXP_LIKE needs the database's compatibility level set to 170, the level for SQL Server 2025.
Oracle's Latest Release
In October 2025, Oracle renamed its database "Oracle AI Database" and released 26ai as the long-term successor to 23ai. Databases on 23ai move to 26ai with a release update rather than a full upgrade. Features first released in 23ai and carried forward make Oracle SQL feel closer to other databases:
| Feature | Example |
|---|---|
BOOLEAN type | is_active BOOLEAN instead of NUMBER(1) |
IF [NOT] EXISTS | CREATE TABLE IF NOT EXISTS ..., DROP TABLE IF EXISTS ... |
SELECT without FROM DUAL | SELECT SYSDATE; |
GROUP BY an alias or position | GROUP BY year_month using a name from the SELECT list |
| SQL/PGQ | GRAPH_TABLE queries from SQL:2023 |
VECTOR type and AI vector search | Included without an extra license |
SQLite
SQLite releases often, with small, careful changes. The latest at the time of writing is 3.54.1 (October 2026); 3.54.0 brought command-line shell improvements, query planner work, and new printf() conversions for JSON strings. Over the last few years SQLite has added STRICT tables (3.37), the -> and ->> JSON operators (3.38), RIGHT and FULL joins (3.39) and binary JSON storage, jsonb (3.45). The examples in Dialect Differences Cheat Sheet were run on 3.54.
The Big Trends
Three directions show up in nearly every recent release:
- Vectors for AI. SQL Server 2025, MySQL 9.x, Oracle 26ai and PostgreSQL (with the widely used
pgvectorextension) can all store embeddings and search by similarity, so an app can keep its AI search next to its regular data. - JSON as a first-class type. Binary JSON types, JSON indexes and standard functions such as
JSON_TABLEnow exist in most major databases (JSON in SQL). - Easier operations. Online maintenance (
REPACK CONCURRENTLY), safer schema changes (NOT VALIDconstraints) and better replication tooling reduce downtime.
Common Mistakes
Using a feature your server doesn't have yet. Check the version, especially on managed services.
Upgrading without reading default changes. A new default can change plans or behavior silently.
Staying on an end-of-life version. No more security fixes. MySQL 8.0 and PostgreSQL 13 are already past end of life; plan upgrades early.
Trusting old blog posts. Answers written for older versions may miss a simpler, newer way, or describe behavior that changed.
Interview Corner
What is the latest SQL standard, and what does it add?
SQL:2023. It adds property graph queries (SQL/PGQ), a JSON type, ANY_VALUE, GREATEST and LEAST, UNIQUE NULLS [NOT] DISTINCT, and new number literal forms.
Name a few recent PostgreSQL features.
PostgreSQL 18 added uuidv7(), OLD/NEW in RETURNING, virtual generated columns, temporal constraints and asynchronous I/O. PostgreSQL 19 added REPACK CONCURRENTLY, ON CONFLICT DO SELECT and JSON output from COPY.
Why is UUID version 7 better than version 4 as a primary key?
It starts with a timestamp, so new values arrive in roughly increasing order and are inserted at the end of the B-tree index, instead of at random places, which keeps the index compact and fast.
What trend do SQL Server 2025, MySQL 9 and Oracle 26ai share?
Native vector types and similarity search for AI applications, alongside stronger JSON support.
Practice
Challenge: Use PostgreSQL 18's RETURNING old and new to raise every Java course's fee by 10% and report each course's old fee, new fee and increase, in one statement.
Show solution
WITH changed AS (
UPDATE courses
SET fee_usd = round(fee_usd * 1.10, 2)
WHERE technology = 'Java'
RETURNING title,
old.fee_usd AS old_fee,
new.fee_usd AS new_fee,
new.fee_usd - old.fee_usd AS increase
)
SELECT * FROM changed ORDER BY old_fee; title | old_fee | new_fee | increase
------------------+---------+---------+----------
Java Basics | 450.00 | 495.00 | 45.00
Java OOP | 500.00 | 550.00 | 50.00
Java Collections | 550.00 | 605.00 | 55.00
(3 rows)One statement changes the three Java courses and reports exactly what changed. Before PostgreSQL 18, you'd need a CTE that read the old values first, or a trigger. round(..., 2) keeps the new fee to cents. RETURNING rows come back in whatever order the update processed them, so the statement sits in a CTE and the outer SELECT sorts them (Common Table Expressions).
Key Takeaways
| You want to | Look at |
|---|---|
| Your PostgreSQL version | SELECT version(); |
| What changed in a release | The official release notes and their "migration" section |
| When support ends | Each project's versioning or lifecycle page |
| Standard support in PostgreSQL | The "SQL Conformance" appendix in its documentation |
Was this tutorial helpful?