The SELECT TOP Clause is used to specify the percentage of rows or to specify the number of rows which needs to be retrieved from a given table.
This is Part 2 of 40 Part SQL Server T-SQL Tutorial. Click here to read it from the beginning….
SELECT TOP Syntax – SQL Server SELECT TOP Clause
Use <DatabaseName>
GO
SELECT TOP VALUE column1, column2, column3,.......
FROM schema.table
GO
SELECT TOP PERCENT Syntax – SQL Server SELECT TOP Clause
Use <DatabaseName>
GO
SELECT TOP VALUE PERCENT column1, column2, column3,.......
FROM schema.table
GO
How to SELECT TOP 10 Records from a table
To select top 10 records from a table execute the below query in SSMS.
Use AdventureWorks2016
GO
SELECT TOP 10
FirstName
, LastName
FROM Person.Person
WHERE LastName = 'Williams'
GO

How to SELECT TOP 10 PERCENT Records from a table
To select top 10 percent records from a table execute the below query in SSMS.
Use AdventureWorks2016
GO
SELECT TOP 10 PERCENT
FirstName
, LastName
FROM Person.Person
WHERE LastName = 'Williams'
GO

Click Next Page button to continue reading the topics and click on the Previous Page button to revisit the previous topic.
Add comment