Loading lessons...
What is SQL?
What is SQL?
SQL stands for Structured Query Language. It is the standard language for storing, manipulating, and retrieving data in a database.
What can SQL do?
- Query data: ask questions like "which customers live in Mexico?"
- Insert new records into tables.
- Update existing records.
- Delete records.
- Create new databases, tables, views, and more.
Where does SQL run?
SQL runs on a database management system (DBMS). Popular ones include:
- MySQL (open source, very popular)
- SQL Server (Microsoft)
- PostgreSQL
- Oracle
- SQLite (embedded, single-file)
Most SQL is the same everywhere, but each system has small differences and extensions.
Rows and columns
Data is stored in tables. A table looks like a spreadsheet:
| CustomerID | CustomerName | Country |
|---|---|---|
| 1 | Alfreds Futterkiste | Germany |
| 2 | Ana Trujillo | Mexico |
- Each table has columns (CustomerID, CustomerName, Country).
- Each row is one record (one customer).
SQL is not case-sensitive
SELECT and select mean the same thing. By convention, SQL keywords are written in UPPERCASE.
TL;DR
- SQL is the standard language for working with databases.
- It reads and writes data inside tables of rows and columns.
- Popular databases: MySQL, SQL Server, PostgreSQL, Oracle, SQLite.
- SQL keywords are conventionally written in uppercase.