Back to SQL Notes
Topic #80

SQL SELECT Statement

SELECT retrieves data from one or more tables. It's the statement you'll write more than any other in SQL.

Syntax

SELECT column1, column2
FROM table_name;

-- every column
SELECT * FROM table_name;

Sample Table: employees

idnamedepartmentsalary
1AmanEngineering65000
2RiyaMarketing52000
3KaranEngineering71000

Example

SELECT name, department
FROM employees;

Output:

namedepartment
AmanEngineering
RiyaMarketing
KaranEngineering

Why Not Always Use SELECT *?

SELECT * is convenient while exploring data, but in real applications it's usually avoided: it pulls columns you don't need (wasting bandwidth and memory), and it silently breaks if the table's columns change later. Naming columns explicitly is the professional default.

Computed Columns

SELECT name, salary, salary * 12 AS annual_salary
FROM employees;

You can select expressions, not just raw columns — covered further in Aliases.

Common Mistakes

  • Using SELECT * in production application code instead of named columns
  • Forgetting that SELECT alone doesn't filter or sort — that's WHERE and ORDER BY

Interview Relevance

The very first thing most SQL interviews check is whether you can write a clean, correctly-scoped SELECT — get comfortable with it before anything else.

Practice Question

Write a query that selects each employee's name and their salary expressed as a monthly figure, assuming salary stores an annual value.

Want to go beyond the notes?

Join Coding Now Tech Institute's SQL course — live mentorship, real projects, and 100% placement support.

Enroll Now — Free Demo Available

SQL SELECT Statement – FAQs

Quick answers about learning SQL SELECT Statement in SQL.

This free note from Coding Now Tech Institute explains SQL SELECT Statement in SQL — concept, syntax and worked code examples you can copy, run and revise before interviews.
Yes. Every SQL topic on Coding Now Tech Institute, including SQL SELECT Statement, is 100% free with no signup required.
With focused practice, most students grasp SQL SELECT Statement in 1–3 days from these notes; pairing it with Coding Now Tech Institute's mentor-led course takes you to job-ready depth faster.
Use the code examples in this note, then ask doubts for free on the Coding Now Tech Institute Community (/community) — expert instructors answer within 24 hours.
Call NowEnroll Now