Skip to main content

SQL

Structured Query Language

Pronunciation
ES-kyoo-EL or SEE-kwul
Updated 2 min read

Share this page

Send the link, quote the definition with a link back, or show it as a card on your own site.

https://softwaredictionary.org/terms/sql

In short

SQL is the standard language for working with relational databases, used to create tables and to insert, query, update, and delete the data stored in them.

What is SQL?

SQL is a language designed specifically for managing data in relational databases, where information is stored in tables made of rows and columns. It lets you describe what data you want, and the database works out how to find it efficiently. SQL was developed at IBM in the 1970s and is standardized by ANSI and ISO.

SQL is declarative: instead of writing step-by-step loops, you write statements like SELECT, INSERT, UPDATE, and DELETE that describe the result you want. Other statements such as CREATE TABLE define the structure of the data, and JOIN combines rows from related tables, for example matching orders to the customers who placed them.

Nearly every relational database uses SQL, including PostgreSQL, MySQL, SQLite, Microsoft SQL Server, and Oracle Database. Each adds its own extensions, called a dialect, but the core commands work almost the same everywhere. SQL is also used in data analysis tools and data warehouses, which makes it one of the most widely useful skills in software.

SQL is a language, not a database product, so a phrase like 'a SQL database' really means a relational database that you query with SQL. It is often contrasted with NoSQL databases, which use other data models. Both 'S-Q-L' and 'sequel' are accepted pronunciations.

At a glance

An SQL query and what it does: SELECT name, city FROM users WHERE age > 30 picks the rows of the users table whose age is over 30 and returns just their name and city.querySELECT name, cityFROM usersWHERE age > 30;users tablenamecityageAdaLondon36LinusHelsinki28GraceArlington45AliAnkara22resultnamecityAdaLondonGraceArlingtonyou say what, the database decides how
SQL is declarative: you describe the result you want, and the database works out how to find it, using an index if it has one.

Key takeaways

  • SQL is the standard language for relational databases.
  • It is declarative: you describe the result, not the steps.
  • The core commands are SELECT, INSERT, UPDATE, and DELETE.
  • JOIN combines data from related tables.
  • Databases share the same core SQL but add their own dialect features.

Example

Joining two tablessql
-- Find the 5 customers who spent the most since the start of 2026
SELECT c.name, SUM(o.total) AS total_spent
FROM customers AS c
JOIN orders AS o ON o.customer_id = c.id
WHERE o.created_at >= '2026-01-01'
GROUP BY c.name
ORDER BY total_spent DESC
LIMIT 5;

Readers ask

Is SQL a programming language?

SQL is a domain-specific language for querying and managing data. It is not a general-purpose language like Python or Java, although database extensions such as PL/pgSQL add variables, loops, and functions.

What is the difference between SQL and MySQL?

SQL is the language, while MySQL is a specific database management system that you query using SQL. PostgreSQL, SQLite, and SQL Server are other databases that also use SQL.

Is SQL hard to learn?

The basics, such as SELECT with WHERE and ORDER BY, can be learned in a few hours because the syntax reads close to English. Advanced topics like joins, indexes, and query optimization take longer to master.

Often compared

See also

Sources

Spotted a mistake or something missing on this page?Suggest an edit

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings