Everything you need to start querying databases — from zero to your first SELECT in minutes.
SQL (Structured Query Language) is the standard language for communicating with relational databases. It lets you store, retrieve, update, and delete data.
Say "S-Q-L" or "sequel" — both are accepted. Invented at IBM in the 1970s, it became the universal data query standard.
The building blocks of every SQL operation.
Retrieve data from one or more columns.
Specifies the source table(s) for the query.
Filter rows matching a condition.
Sort results ascending or descending.
Cap the number of returned rows.
Add new rows into a table.
Modify existing row values.
Remove rows from a table. ⚠️ Always use WHERE!
Define a new table schema.
| TYPE | STORES | EXAMPLE | NOTE |
|---|---|---|---|
| INT | Whole numbers | 42, -7, 1000000 | Use for IDs, counts, ages |
| VARCHAR(n) | Variable-length text | 'Alice', '[email protected]' | n = max characters |
| DECIMAL(p,s) | Precise decimals | 99.95, 1234.56 | Use for money/prices |
| DATE | Calendar date | '2025-06-18' | YYYY-MM-DD format |
| DATETIME | Date + time | '2025-06-18 09:30:00' | Full timestamp |
| BOOLEAN | True/false | TRUE / FALSE / 1 / 0 | Some DBs use TINYINT(1) |
| TEXT | Long text | 'Long description...' | No length limit, slower |
Experiment with SQL examples below — edit and run any query.