Read Table

We’ll now explore how to read data from a table in SQL — not just all of it, but only what we need, in the shape we want.

Sometimes you want all columns. Other times, maybe just names. Or maybe employees older than 30. You might want just the top 3 records, or names that start with 'A'. SQL gives you the flexibility to shape your results however you need.

Topic: Read Table

Let’s start by refreshing the simplest way to read data — using the SELECT statement.

Basic Query

SELECT * FROM employees;

This will return all columns and all rows from the employees table.


But what if we only want some columns?

SELECT name, age FROM employees;

This returns just the name and age columns for every row.


As we go forward, you’ll learn how to filter, sort, and format your results — so you only get what’s useful to you!