

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
click for more info
Not enough gems
Cost: 6 gems
1: Welcome to Learn SQL
incomplete
2: Select Single Column
incomplete
3: Select Multiple Columns
incomplete
4: What Is SQL?
incomplete
5: Which Databases Use SQL?
incomplete
6: Comparing SQL Databases
incomplete
7: NoSQL vs. SQL
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Databases are made up of tables which are made up of columns (AKA "fields"). It's just like an Excel spreadsheet.
Each row in a table is a single record. For example, here are three rows from our CashPal users table:
| id | name | age | balance | is_admin |
|---|---|---|---|---|
| 1 | John Smith | 28 | 450 | 1 |
| 2 | Darren Walker | 27 | 200 | 1 |
| 3 | Jane Morris | 33 | 496.24 | 0 |
In the last lesson, we used the * wildcard to get all the columns. To select only a single column, swap out the * for the name of the specific column:
SELECT
name
FROM
users;
Update the query to only select the age column from the users table.