Almost every SQL story starts the same way: SELECT the columns, FROM the table. Everything else is decoration.
1 SELECT picks columns
List the columns you want, separated by commas, in the order you want them.
2 FROM picks the table
The engine scans that table and hands each row to SELECT for trimming.
3 The star shorthand
SELECT * means every column, in table order. Great for exploring, wasteful in production.
4 Rows keep their order
Without ORDER BY, rows come back in whatever order the scan found them.
Two keywords, one grid
SELECT picks columns1List the columns you want, separated by commas, in the order you want them. FROM picks the table2The engine scans that table and hands each row to SELECT for trimming. The star shorthand3SELECT * means every column, in table order. Great for exploring, wasteful in production. Rows keep their order4Without ORDER BY, rows come back in whatever order the scan found them. 4 building blocks make up Two keywords, one grid
Press play: the engine scans students and passes every column through — the grid mirrors the whole table.
SELECT *
FROM students;
students
| id | name | score | city |
|---|
| 1 | Ava | 92 | Oslo |
| 2 | Ben | 82 | Oslo |
| 3 | Chloe | 85 | Lima |
| 4 | Dev | 68 | Lima |
| 5 | Emma | 95 | Oslo |
| 6 | Finn | 88 | Paris |
| id | name | score | city |
|---|
| press play — rows will appear here |
Step 1/6FROM locates students and the scan begins. The star in SELECT means every column.
Click each stage to see what the engine does between your keystroke and the grid.
Same table, three queries. Only the column list changes — do the outputs?
Your predicted output — one line per console line
Hint: The result columns appear in exactly the order you list them — and * means every column, in table order.
Click a term, then click its description to lock the pair.
5 conceptsTap a card to expand ?SELECTdrops into place
?FROMdrops into place
?*drops into place
?Projectiondrops into place
?Result griddrops into place
01Every query has the shape SELECT columns FROM table.
02Projection trims columns; it never trims rows.
03SELECT * returns the table exactly as stored — columns in table order.
04You can list columns in any order; the result follows your list.
05Without ORDER BY, row order in the result is not guaranteed.