⚡ 180+ new openings posted today

Select Statement in SQL

What is a select Statement ?

Answer : The SQL SELECT statement is used to fetch data from a database table.

Example :

We have a Employees table:

Employee_IDEmployee_NameSalary
101Anjali5000
102Priya4000
103Amit6000

if you want to select all the fields from the table, use the following syntax:

Syntax : Select * from table_name;

Select * from Employees;

Return :

Employee_IDEmployee_NameSalary
101Anjali5000
102Priya4000
103Amit6000

To retrieve only specific columns:

Syntax : Select column1, column2….. from table_name;

Here column1 , column2… are the fields of a table whose values you want to fetch.

Select Employees_Name, Salary from Employees;

Return :

Employee_NameSalary
Anjali5000
Priya4000
Amit6000

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top