Skip to main content
Albero Academy

SELECT Basics

Retrieve columns from a table — the most-used SQL statement.

Foundations8 min

SELECT is how you read data — by far the most-used SQL statement. You choose which columns to return and which table to read from.

Selecting columns

SELECT … FROM
SELECT name, package -- specific columns
FROM students;
SELECT * -- all columns (convenient, but be deliberate)
FROM students;
SELECT name AS student_name -- rename a column in the output
FROM students;

A word on SELECT *

Key takeaways

  1. 01SELECT columns FROM table reads data — the core SQL statement.
  2. 02List specific columns rather than SELECT * in real queries.
  3. 03AS renames a column in the result (an alias).
  4. 04SQL keywords are conventionally uppercase; statements end with a semicolon.

Finished this chapter?

Mark it complete to track your progress through SQL.