sql · level 1 · unit 1 · lesson 1
- meet it
- guess first
- your turn
- fix it
- nailed it
Tap a green word if you get lost.
meet it
A is a spreadsheet you can ask questions.
A database is where a computer keeps information neat and tidy. Inside it are tables. A is a grid about one kind of thing, like the puddings on a café menu.
Each is one thing, such as one pudding. Each is one detail, such as the price. The top line gives each column its name.
You never dig through a database by hand. You write it a question and it hands back the answer. Write two and it answers them in order, top line first. It never guesses what you meant.
SELECT * FROM puddings; Press run and this question shows the whole puddings table, and next lesson you will learn to read it.
guess first
There are three tables on this menu. What comes back?
Guess before you run it. Wrong guesses are how you learn, and nothing is marked.
SELECT * FROM starters;
your turn
Your turn. Order from the menu.
The menu has three tables: starters, mains and puddings. Type the one you fancy in place of the blank, then press run.
result
Your answer appears here as a table.
fix it
Pudding before the main course? Can you fix it?
result
Your answer appears here as a table.
- The database answers from the top line down. Which table comes first here?
- Pudding first, then the main course? The two lines are in the wrong order.
- Swap the two lines so the mains line is on top, then press run.
nailed it
you asked a database your first question. :D
- A database keeps information in tables.
- A row is one thing. A column is one detail.
- The database answers exactly what you ask, top line first.
new words in your collection
- database
- table
- row
- column
This lesson isn’t saved. A free account remembers every lesson you finish.