AtomLearnAtomLearn
DashboardGoalsPathAchievementsReviewSign In
SQL & DatabasesNot Started

SELECT & FROM

Retrieve columns from a table — the simplest complete SQL query

0%
Knowledge0%
Learn & Drill
Fluency0%
Drill & Speed
Retention0%
Mastery & Review
Confidence0%
All modes
Practice
Knowledge
Fluency
Retention

Knowledge Debt detected

You can study this freely — but your score may plateau if these foundations have gaps. The Mastery badge requires them to be solid.

Explanation

SELECT retrieves data from a database table. Combined with FROM, it's a complete, runnable query.

sql
SELECT name, email
FROM users;

The two required parts:

  • 1. SELECT — which columns to return
  • 2. FROM — which table to read from

Selecting all columns with the * wildcard: ``sql SELECT * FROM users;

Renaming a column in the output with AS: ``sql SELECT name AS full_name FROM users;

SQL keywords (SELECT, FROM) are case-insensitive — select works the same as SELECT — but uppercase is the convention for readability.

Examples

Selecting specific columns

Returns only the id, name, and email columns for every row in users

SELECT id, name, email
FROM users;

How well did you understand this?

Next in SQL & Databases

Filtering with WHERE

Continue