- In this article we will explain how to TOP keyword in SQL Server or what is TOP keyword in SQL Server or how to retrieve Top record in SQL Server with example.
The SQL TOP keyword used to return specified number of record from tables. It is best for performance with Returning a large number of records .such as you have thousands record but you want only some specific number of record then use top keyword.
SELECT TOP number column_name
The Following SQL Statement selects all Records from Student Table.
select id,Name,Mobile,address1 from Student
The Following SQL Statement selects top 5 Records from Student Table.
select top 5 id,Name,Mobile,address1 from Student
I hope this article will help to you.