• Introduction:

    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.

    Description:

    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.

    Syntax:

SELECT TOP number column_name
FROM table_name

Example:

The Following SQL Statement selects all Records from Student Table. 

select id,Name,Mobile,address1 from
Student

Result:

TOP Keyword in SQL

SELECT  TOP

     The Following SQL Statement selects top 5 Records from Student Table. 

select top 5 id,Name,Mobile,address1 from Student

Result:

TOP Keyword in SQL


I hope this article will help to you.



Leave a comment

Make sure you enter the (*) required information where indicated. HTML code is not allowed.

You may also like