SELECT your data
Meet your first database
Lesson 1 of 20 · 5 min · Module 1: Read & shape results
SQL helps you ask questions of structured data. A database holds tables, each with named columns and rows of records.
Start this lesson →Free. No installation: you write and run the code in your browser, and it is checked automatically.
By the end, you’ll be able to…
- Identify a table, row, and column
- Select one named column
- Read a query result
The idea
Use SELECT to choose columns and FROM to choose a table. An asterisk * means all columns. Every exercise starts with a fresh learners table.
SELECT * FROM learners;
01A table has a defined structure
learners contains one learner per row. Columns such as name and xp hold specific attributes. Selecting name returns just that column for every matching row.
02Write the question in SQL
SELECT names the result columns; FROM names the table. A semicolon ends the statement. Without ORDER BY, do not depend on a particular row order.
SELECT name FROM learners;
Your turn
name column from the learners table.What the checks look for
- Returns all five names in one column
Take this with you
Start a query by deciding what one result row should represent.