What's New in SQL

Updated · 11 min read
easyPostgreSQL 18sqlwhats-newsql-2023postgresql-18postgresql-19sql-server-2025mysqloraclesqlite

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 JSON type, ANY_VALUE, GREATEST/LEAST and more.
  • PostgreSQL 18 (September 2025): uuidv7(), OLD and NEW in RETURNING, virtual generated columns by default, temporal keys, faster I/O.
  • PostgreSQL 19 (November 19, 2026): REPACK to shrink tables online, ON CONFLICT DO SELECT, JSON output from COPY, 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 JSON type, regular expression functions and a VECTOR type.
  • Oracle AI Database 26ai replaced 23ai, keeping its BOOLEAN type, IF NOT EXISTS and 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:

FeatureWhat 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 typeA 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, RPADLong-standing extensions, now standard
UNIQUE NULLS DISTINCT / NULLS NOT DISTINCTChoose whether NULLs count as duplicates in a unique constraint
Number literalsUnderscores (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:

SQL▶ Try it
-- 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;
Output
 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.

RETURNING old and new: before and after in one statement
PostgreSQL 18 changeWhy it matters
Asynchronous I/OReads from disk can overlap, speeding up scans and VACUUM on many systems
Virtual generated columns, now the defaultComputed when read, taking no space (Generated Columns and Domains); add STORED to keep the old behavior
Temporal constraints: WITHOUT OVERLAPS, PERIODA key such as (course_id, valid WITHOUT OVERLAPS) stops two fee periods for one course overlapping
B-tree skip scanA multicolumn index can help even when the query doesn't filter on its first column (Index Design)
NOT NULL ... NOT VALIDAdd a not-null rule to a big table without a long scan, then validate later (Schema Migrations)
Statistics kept across major upgradesQueries plan well right after pg_upgrade
OAuth sign-in, md5 passwords deprecatedUse 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 changeWhat 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 SELECTReturns the existing row when an insert conflicts, instead of doing nothing or updating it (Upsert and MERGE)
COPY ... TO with JSON outputExport rows as JSON directly
Logical replication of sequencesSequence values follow the data, which helps major-version upgrades by replication
WAIT FOR LSNLets an app wait until a standby has caught up, for read-your-writes on replicas (Replication and Scaling)
pg_plan_adviceRecords and pins planner choices, such as join order, to keep important plans stable
Changed defaultsJIT compilation is off by default; md5 passwords now raise a warning; RADIUS sign-in was removed
A snapshot of recent releases, November 2026

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.

ReleaseNotes
MySQL 8.0Reached end of life in April 2026; upgrade to 8.4 or 9.7
MySQL 8.4 LTSThe 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 releasesNow 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:

FeatureWhat it does
Native JSON type and JSON indexStores JSON in an efficient binary form instead of text in NVARCHAR
Regular expression functionsREGEXP_LIKE, REGEXP_REPLACE, REGEXP_SUBSTR and others, long available in PostgreSQL, MySQL and Oracle
VECTOR type and vector searchStore embeddings and find the most similar rows, with an approximate vector index
Optimized lockingFewer 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:

FeatureExample
BOOLEAN typeis_active BOOLEAN instead of NUMBER(1)
IF [NOT] EXISTSCREATE TABLE IF NOT EXISTS ..., DROP TABLE IF EXISTS ...
SELECT without FROM DUALSELECT SYSDATE;
GROUP BY an alias or positionGROUP BY year_month using a name from the SELECT list
SQL/PGQGRAPH_TABLE queries from SQL:2023
VECTOR type and AI vector searchIncluded 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.

Three directions show up in nearly every recent release:

  1. Vectors for AI. SQL Server 2025, MySQL 9.x, Oracle 26ai and PostgreSQL (with the widely used pgvector extension) can all store embeddings and search by similarity, so an app can keep its AI search next to its regular data.
  2. JSON as a first-class type. Binary JSON types, JSON indexes and standard functions such as JSON_TABLE now exist in most major databases (JSON in SQL).
  3. Easier operations. Online maintenance (REPACK CONCURRENTLY), safer schema changes (NOT VALID constraints) and better replication tooling reduce downtime.
Vectors, JSON and easier operations

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
SQL▶ Try it
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;
Output
      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).

Quick check: What's new

4 questions
1Which edition of the SQL standard is current?
2What does RETURNING old.fee_usd do in PostgreSQL 18?
3Which PostgreSQL 19 command shrinks a bloated table without blocking reads and writes?
4Which feature have SQL Server 2025, MySQL 9 and Oracle 26ai all added?

Key Takeaways

You want toLook at
Your PostgreSQL versionSELECT version();
What changed in a releaseThe official release notes and their "migration" section
When support endsEach project's versioning or lifecycle page
Standard support in PostgreSQLThe "SQL Conformance" appendix in its documentation

Was this tutorial helpful?

Lesson 111 of 115