Skip to content
AgileLogics
4 min read

What Is SQL?

SQL (Structured Query Language — pronounced "S-Q-L" or "sequel") is the standard language for working with relational databases. It was developed at IBM in the 1970s, became an ANSI and ISO standard in 1986, and is still the most widely used way to store and query data.

SQL is a query language, not a general-purpose programming language. You don't use it to build a whole app; you use it to ask a database questions and to change the data it holds:

SELECT name, city
FROM customers
WHERE city = 'London';
+--------------+--------+
|     name     |  city  |
+--------------+--------+
| Ada Lovelace | London |
| Alan Turing  | London |
+--------------+--------+

Even without knowing SQL, you can probably read that: "select the name and city from customers where the city is London". Its defining traits:

  • Declarative — you describe what data you want, not how to find it. The database works out the fastest way to get it.
  • Set-based — a query works on whole sets of rows at once, not one row at a time.
  • Standard, with dialects — the core language works in every major database (PostgreSQL, MySQL, SQLite, SQL Server, Oracle), but each adds its own extras and small differences.

This course teaches standard SQL. Every example runs on SQLite (version 3.53), which needs no server; where PostgreSQL, MySQL, or SQL Server differ, the lessons point it out.