RETURN TOP FIVE RECODRS FROM TABLE

Anoop Singh

Total Post:12

Points:84
Posted by  Anoop Singh
 1516  View(s)
Ratings:
Rate this:
Hi All,

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

thanks
  1. Alex R

    Post:40

    Points:280
    Re: Return Top Five Recodrs From Table

    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.

    select

    top(5) * from student_record

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!