SELECT Clause in SQL SERVER

SELECT Definition


SELECT clause in SQL SERVER enables you to retrieve rows of data from one or multiple tables.

SELECT Usage


We use the SELECT clause by either specifying the column names in the SQL query or by using the * operator.


To select all columns:

SELECT * FROM table_name

To select some columns:

SELECT column1, column2,... FROM table_name

SELECT Examples

For our examples, we will use a student table.


To show all student information:

SELECT * FROM Student
Select all columns

To show only the first name and last name of students:

SELECT FirstName, LastName FROM Student
Select some columns

See also