SQL
SQL is the standard language for querying data from databases organized into tables, and for entering, modifying, and deleting data.
In plain terms
Imagine a vast archive where all data is stored in organized tables: customers, orders, invoices. SQL is the language you use to tell the archivist what to search for. You do not describe how to find it, but what you want to see.
An SQL statement is almost readable in English: 'select name and city from customers where city is Szeged'. The database management program itself decides the fastest path to the result.
It differs from Excel in that you do not click or scroll, but write down the question. This allows it to handle millions of rows, and many people or programs can work on the same data simultaneously.
SQL has been a basic tool for decades, and in the AI era it has taken on a new role: language models write SQL well, so an agent can create a query from your Hungarian sentence and retrieve the answer from the corporate database.
How it works
- Data is stored in tables: each row is an item (for example, an order), and each column is a property (date, amount, customer).
- You write the query with a few keywords: SELECT specifies what you ask for, FROM which table, and WHERE the condition.
- The database system interprets the statement and builds an execution plan, that is, it picks the search path estimated to be the fastest, for example by using indexes.
- If needed, it joins several tables (JOIN) along a common identifier, so the customer's order and invoice appear next to their name.
- The result is a new table, which you, a program, or an agent uses; with other commands (INSERT, UPDATE, DELETE), the data can be modified.
An everyday example
When you filter your card purchases from the last three months in online banking, an SQL query is likely running in the background in the bank's database. The same happens if you ask your workplace AI assistant what the turnover was last month: the agent writes SQL, runs it, and returns the result in a sentence.
Who is affected
A common misconception
Limits and risks
- A query can return bad results without an error message, for example if two tables are joined incorrectly and rows are duplicated.
- AI-written SQL looks convincing but may misinterpret column meanings, so verify results for critical numbers.
- Modification and deletion commands in most settings take effect immediately and permanently; they can only be undone with special preparation (a transaction or from a backup). An unconditional deletion can empty an entire table, so an agent should preferably be given only read access.
- Carelessly written programs are vulnerable to so-called SQL injection, where an attacker injects their own command into the database through an input field.
Similar, but not the same
- Database – The database is the organized data store, and SQL is the language in which you query it.
- NoSQL – NoSQL databases store data not in fixed tables but in documents or key–value pairs, and they mostly have their own query methods.
- Programming language – In a broader sense, SQL is also a programming language, but it is only for data management. In a general-purpose language like Python, you write the tasks step by step, whereas in SQL you only describe the desired result.
Related concepts
Database, Query language, Data management
Query, SQL injection, Text-to-SQL
Relational database, NoSQL, vector database, API, Python
A brief history
The predecessor of SQL, the SEQUEL language, was written by IBM researchers Donald Chamberlin and Raymond Boyce in 1974, building on Edgar F. Codd's 1970 relational data model. The American ANSI adopted it as a standard in 1986, and the international ISO in 1987.
Where things stand
By the end of 2026, SQL remains the base language for data management, and most business systems are built on it. The novelty is that increasingly, not a human but a language model or agent writes the query from a natural language question.
Also known as
SQL · Structured Query Language · structured query language · SQL-nyelv · SQL query · SQL query · SEQUEL · with alkali soil
This entry was machine-edited and has undergone machine expert review; the “In the news” section updates automatically from Agent Age stories.