The SQL Server SELECT statement is used to query or retrieve data from a table in the database.
It’s comes under SQL Server Data Manipulation Language(DML) commands.
Syntax:
With condition: SELECT expressions FROM Table_name WHERE conditions; Without condition: SELECT expressions FROM Table_name
Note: Related post:- CREATE, INSERT, UPDATE & DELETE in SQL Server
Example:
Get All records from Table
SELECT * FROM DimEmployee
Get particular record from Table
SELECT * FROM DimEmployee WHERE EmployeeKey = 1
Select few columns data from Table
SELECT firstName, lastName, IdentityNo FROM DimEmployee
Hope you enjoy the post. Your valuable feedback, question, or comments about this post are always welcome or you can leave us message on our contact form , we will revert to you asap.
Recommended SQL Server Post: