Loading Data Driven Insights
Preparing your learning content.
Preparing your learning content.
A beginner-friendly guide to the SQL SELECT statement, including basic syntax, choosing columns, sample output, and why selecting only needed columns is a better habit.
On this page
Jump to a lesson section
The SELECT statement is used to read data from a table.
It tells SQL which data you want to see in the result.
FROM, WHERE, and ORDER BYSELECT tells SQL what data you want to see.A basic SELECT query contains two important parts:
SELECT
column_name
FROM table_name;
SELECT
employee_name
FROM Employees;
employee_name column from the Employees table.SELECT chooses the columns. FROM chooses the table.We will use this Employees table to understand how SELECT returns data.
SELECT examples.You do not always need every column from a table.
You can list only the columns you want after SELECT.
SELECT
employee_name,
department
FROM Employees;
SELECT.SELECT * returns every column from the table.
That can be useful while learning, but in real projects it is usually better to select only the columns you actually need.
SELECT *
FROM Employees;
SELECT
employee_name,
salary
FROM Employees;
SELECT to choose the exact columns you want.Selecting only needed columns makes queries cleaner, easier to read, and more efficient.
SQL Roadmap Progress
Topic 7 of 111
6% complete
Next in SQL Roadmap
Continue with the next SQL topic in the recommended roadmap order.
Continue learning →