Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
shishi
Starting Member
7 Posts |
Posted - 2004-05-28 : 05:00:47
|
| Hi,A table contains information of students & their markssuch as stud_id , stud_name , marksI want to retrive first 10 ten top rankedstudents name . Howz it done ?Thanx in advanceshishi |
|
|
srinivasanr
Starting Member
15 Posts |
Posted - 2004-05-28 : 05:08:19
|
| Hope this is you need...SELECT TOP 10 stud_id, stud_nameFROM students_marksORDER BY marks DESCWallops!!! |
 |
|
|
shishi
Starting Member
7 Posts |
Posted - 2004-05-28 : 06:07:23
|
| Hi Srini,Thanx for ur quick reply .But I need to retrieve only the 10 students who scored highmarks in order , not first 10 students.Thanx in advanceshishi |
 |
|
|
Pethron
Starting Member
10 Posts |
Posted - 2004-05-28 : 06:27:22
|
| Thats why it is ordered by marks, so the first 10 students are the 10 students whith the highest marks... |
 |
|
|
shishi
Starting Member
7 Posts |
Posted - 2004-05-28 : 06:31:21
|
| Oh , Thanx for all the peoplewho helped me- Shishi |
 |
|
|
|
|
|