SQL Intro
SQL — Structured Query Language — is the language for reading, writing, and shaping data in a relational database. Almost every back-end you'll ever build sits on top of it.
What SQL does
| Job | Statement |
|---|---|
| Read rows | SELECT |
| Add rows | INSERT |
| Change rows | UPDATE |
| Remove rows | DELETE |
| Create / change schema | CREATE, ALTER, DROP |
| Control transactions | BEGIN, COMMIT, ROLLBACK |
Where SQL runs
- MySQL / MariaDB — the LAMP-stack default, behind countless web apps.
- PostgreSQL — feature-rich open source DB; favoured for new projects.
- SQLite — single-file DB embedded in phones, browsers, and Laravel test suites.
- SQL Server — Microsoft's flagship database.
- Oracle / Db2 — enterprise heavyweights.
One shape, many flavours
The core grammar — SELECT cols FROM table WHERE cond — is the same everywhere. Differences appear around date functions, paging (LIMIT vs TOP), and JSON support. This tutorial flags those forks where they matter.
Tip: If your laptop has no DB installed, the easiest playground is a SQLite file — one file, zero config. Most examples in this tutorial run unchanged on SQLite.
Example
Exercise
SQL stands for…
Query Language
Ten letters; the S in SQL.
Discussion
Loading…