SQL isn’t dying, it’s mutating

Header sketch for the post: SQL isn’t dying, it’s mutating
In shortEvery few years we hear that SQL is finished: because of NoSQL, because of Big Data, and now because of AI. Yet each time SQL absorbs the new technology and stays the interface to the data. This post is for anyone who writes SELECT and wonders whether AI will take away their craft.

Where this thesis comes from

In autumn 2025 I prepared a talk called "O SQL, AI i Przyszłość Baz Danych" ("On SQL, AI and the Future of Databases"). The plan was simple: three acts, SQL, AI and the databases of the future. The longer I collected material, the more one sentence kept coming back to me, and in the end it made it onto a slide:

"SQL isn't dying, it's mutating."

I talked about this in Kraków and Bielsko-Biała at meetups with students, where the topic was simple: is it still worth writing and learning SQL? It turns out it is, because SQL is alive and well.

This is not a sentimental defense of SQL. It is an observation from the history of the language and from everyday work on Databricks, where we call AI more and more often in exactly the places where we used to write a plain SELECT.

The foundation: we say "what", not "how"

SQL is a declarative language. We write what result we want, and the engine decides how to compute it. A classic example from the slide:

✓ Tested on Free Edition (2026-10-17)

SELECT name, salary
FROM employees
WHERE salary > 5000
ORDER BY salary DESC;

There are no loops, no indexes and no file read order here. Thanks to that, the optimizer can change the way the query runs while the query itself stays the same. In my opinion this is the main reason SQL has survived more than half a century of technology changes: the "what" layer is separated from the "how" layer, so almost everything underneath can be swapped out.

For anyone who has not written SQL yet, let's take this query apart. SELECT name, salary says which columns we want to see. FROM employees points to the table with employees. WHERE salary > 5000 is a filter: only the rows where the salary is greater than 5000 stay. ORDER BY salary DESC sorts the result from the highest salary. In the demo the table has five employees, two of whom earn 5000 or less, so three people are left in the result. Nowhere do we say in what order to read the files or how to walk through the data. We only describe the result we expect, and that is exactly "what, not how".

Result of the SELECT query with the salary > 5000 filter: three rows, 7300, 6250 and 5100, sorted from the highest salary.

Lab result: the query with the WHERE salary > 5000 filter in the notebook.

A bit of history, because it helps to see the scale. SQL is more than 50 years old, and in that time it has lived through several waves that were supposed to replace it:

  • 1970 – Edgar F. Codd at IBM publishes "A Relational Model of Data for Large Shared Data Banks". Data lives in tables (relations), and a query describes the result, not the path to the data. This is where "what, not how" starts.
  • 1974 – Donald Chamberlin and Raymond Boyce describe the SEQUEL language at IBM. The name was later shortened to SQL, because "SEQUEL" was already another company's trademark.
  • 1979 – Relational Software (later Oracle) ships Oracle V2, one of the first commercial databases with SQL. IBM's own SQL/DS only goes on sale in 1981.
  • 1986–1987 – ANSI and ISO standardize the language (SQL-86). From that point on, SQL does not belong to one company.
  • 1992 – SQL-92 adds, among other things, JOIN ... ON, CASE and CAST. Every database today knows most of this version.
  • 1999 – SQL:1999 gets recursive queries (WITH RECURSIVE) and triggers.
  • 2003 – SQL:2003 brings window functions (ROW_NUMBER() OVER (...)) and MERGE into the standard.
  • 2009 – the "NoSQL" label appears, along with the first loud predictions of the end of SQL.
  • 2014 – Spark SQL: SQL comes back to Big Data, this time on a distributed engine.
  • 2016 – SQL:2016 adds JSON support, the answer to document databases.
  • 2023 – SQL:2023 gets graph queries (SQL/PGQ) and a JSON type, and pgvector, vectors in PostgreSQL, lands in managed databases at the big cloud providers. Two years later SQL Server 2025 has a native VECTOR type.
SQL timeline from 1970 to 2023: relational model, SEQUEL at IBM, the SQL-86 standard, recursive queries, NoSQL, Spark SQL and vectors in SQL.

The timeline shows the rhythm well: every few years something appears that is supposed to replace SQL, and a few years later the same thing lands in SQL as a new function or a new data type.

On top of that, it is not a niche language. In the Stack Overflow Developer Survey 2023, 51.52% of professional developers used SQL (48.66% of all respondents).

Four mutations

The most interesting part is what happened to SQL each time a technology appeared that was supposed to "kill" it.

Era What appeared How SQL responded
Relational tables, ACID, foreign keys SQL as the query language for relations
NoSQL documents, JSON JSONB in PostgreSQL, JSON functions in SQL Server
Big Data distributed processing, files in a data lake Spark SQL, Presto, BigQuery, Snowflake
AI embeddings, semantic search vector types, AI functions and vector search called from SQL

In the talk I summed it up with the sentence I like most in the whole deck: "Each era did not replace the previous one – it extended it." Relational databases still handle transactions, warehouses handle analytics, the lakehouse handles data science, and vectors handle AI. Evolution goes through specialization, and SQL stays the common language on top.

Vectors show this well. On the slide "The giants didn't wait" I showed that PostgreSQL got the pgvector extension and SQL Server 2025 got a native VECTOR type. Instead of moving data to a separate vector database, we can add an embeddings column next to the existing tables.

A correction to my own slide: the function for generating embeddings in SQL Server 2025 is called AI_GENERATE_EMBEDDINGS, not GENERATE_EMBEDDING. The demo scripts had the correct name, the slide did not.

It is not only what SQL handles that mutates, but the syntax itself. On Databricks, since DBR 16.2 we can write queries as a pipeline (pipe syntax): we start with FROM and add the filter, the sort or an aggregation one by one after the |> operator, in the order in which the data flows through the query. Since DBR 16.3 there is SQL scripting, and since 17.0 stored procedures. The language that was supposed to die gets new constructs every few runtime releases.

What this mutation looks like on Databricks

In Databricks SQL, semantic search is simply another function in the FROM clause. We do not have to compute the question vector ourselves, because with a Delta Sync index with managed embeddings the embedding endpoint does it for us (on every query, so this is not a free SELECT). With query_type => 'HYBRID' the same function combines keyword and semantic search.

In the demo the notebook prepares everything itself: a coffee_tips table with eight short tips (about coffee, but also about tea and descaling the kettle), an AI Search endpoint and a Delta Sync index where the databricks-gte-large-en model computes the embeddings. Then we ask a question in plain text:

✓ Tested on Free Edition (2026-10-17): the whole notebook, with the endpoint and the index (Free Edition allows one AI Search endpoint per workspace)

SELECT *
FROM vector_search(
  index => 'workspace.dataistheway.coffee_tips_index',
  query_text => 'how to brew coffee properly',
  num_results => 3
);

In the notebook the index name comes from the catalog and schema widgets (by default workspace.dataistheway, the same as above). I recorded the video on our workspace, where the catalog is called dataistheway.

Three tips came back: the French press one (a coarse grind and about four minutes of steeping), keeping the beans in an airtight container, and weighing the coffee (about 60 g per litre of water). None of them contains the words "brew" or "properly", so WHERE tip LIKE '%brew%' would find nothing. The tea and kettle tips did not make it into the result. The similarity scores (search_score) were close together, from 0.602 to 0.620, so with eight rows I would not draw conclusions from the order alone.

vector_search() result for the question "how to brew coffee properly": three coffee tips with similarity scores from 0.602 to 0.620.

Lab result: the three closest tips and their search_score.

vector_search() is in Public Preview, query_text works from DBR 15.3, and the function does not run on a classic SQL warehouse. num_results can be at most 100.

It is still a SELECT. What changed is what happens underneath: instead of comparing letters, we compare meanings. How LIKE, full-text and vectors differ is covered in "Magnifying glass, book and buddy".

Pitfalls

  • The endpoint is billed for as long as it runs, not only per query. That is why the notebook deletes the index and the endpoint at the end. If we stop the notebook halfway, we have to delete the endpoint ourselves.
  • The index waits for the endpoint. Preparing the index alone took about 20 minutes for me, because the index was waiting for the endpoint to come up.
  • Running it again right after the first run. Deleting the endpoint takes a while too (about 15 minutes for me). Until it is gone, creating an endpoint with the same name fails with AlreadyExists, so we wait or change the endpoint name (ENDPOINT in the notebook).

AI without data is an empty box

The second thesis from the talk matters more to me than the first: "AI without data is an empty box."

The best language model does not know what products we have, who our customers are, or what happened yesterday in the sales system. It can only guess. On the other hand, we have petabytes of data, neatly arranged in tables, but a classic query requires knowing the structure, and full-text search looks for words, not meanings. We cannot ask "what do our customers think about product X?" in a WHERE clause alone.

That is why I do not see competition here. RAG, agents and Genie need data that someone has modeled, cleaned and described beforehand. When Mariusz Wiecha and I were preparing a workshop on AI agents a year later, many of the problems were not in the model but in the data: duplicated customer rows, an unclear measure definition, permissions that disappeared after a function was recreated (more on this in "Policies go to the catalog, not the prompt"). This is the area where SQL people feel most confident.

Since 2009 someone has predicted the death of SQL every few years. Today we have Spark SQL, and we even call AI models from SQL.

What this means in practice

A few things I do myself and recommend to people on data teams:

  1. Let's not drop SQL for "AI alone". If an agent or Genie generates a query, someone has to be able to read it and judge whether it computes the right thing.
  2. Let's learn new functions in the old language. On Databricks, we call ai_query, AI functions and vector search from SQL. The barrier to entry is low, because the syntax is familiar. The low barrier has another side, though: an AI function in a SELECT calls the model for every row. In production, who may call which model and at what cost is decided in Unity Gateway, not in the query.
  3. Let's take care of data semantics. Comments on tables and columns, measure definitions, clear names. This is what Genie Agents (formerly Genie spaces) and our own agents use.
  4. Let's pick the method for the problem. LIKE and regex are still the best choice when we know the pattern (a product code, an email). Vectors make sense when we are looking for intent.

If I had to recommend one thing for tomorrow: take one table your team uses and add column comments. That decides whether Genie and agents understand the data at all.

What this thesis does not say

"SQL isn't dying" does not mean everything should be done in SQL. We train an ML model in Python, and we build an agent in code, not in a stored procedure. It also does not mean that SQL understands meaning by itself. The embedding model understands it, and SQL gives us a convenient interface to it. And finally: the fact that SQL has survived so far is no guarantee that it will last forever. It depends :) So far, though, every wave of novelty has ended the same way: with a new data type and new functions in a familiar language.

See it run

The recording shows the whole lab notebook, from the SELECT query to vector_search() and the cleanup. The wait for the index is sped up 8×.

✓ Tested in the lab on 17 Oct 2026. Code from the recording: sql-isnt-dying-its-mutating

Code for this article on GitHub →notebook and a step-by-step README · sql-isnt-dying-its-mutating

Summary

To close the talk I used a sentence that sums up the whole series well:

"Structure without semantics is dead data. Semantics without structure is chaos."

  • SQL survived because it separates "what" from "how", so the engine underneath can be swapped.
  • Each era extended the previous one: JSON, Big Data, and now vectors and AI.
  • AI needs data, and data needs people who understand it.

Next: "Magnifying glass, book and buddy: LIKE, full-text and vectors in plain words".

Want more posts? Follow along via RSS or on LinkedIn.

Comments

Quiet on the trail so far. Be the first to comment.

Leave a comment

Your e-mail will not be published. Comments are moderated and appear once approved. Privacy policy