Home > DeveloperSection > Forums > Return Top Five Recodrs From Table
Anoop Singh
Anoop Singh

Total Post:12

Posted on    October-08-2010 7:40 AM

 MSSQL Server MSSQL Server 

 1 Reply(s)
 1459  View(s)
Rate this:
Hi All,

Could anyone please help me out. How to query in sql server 2008 to get
top 5 records.


Alex R
Alex R

Total Post:40

Posted on    October-08-2010 9:24 AM

Hi Anoop,

You can select top 5 records from your table by using sql server top(<number of rows>) function.

Here is an example, which selects top 5 records from table student_record.


top(5) * from student_record

Don't want to miss updates? Please click the below button!

Follow MindStick