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 |
|
Divyanshu
Starting Member
2 Posts |
Posted - 2011-08-03 : 03:24:25
|
| I want to select top max(marks) 4 records from tablecan anyone write the query in SQL server 2005===========Name marks1 1002 1013 204 605 1206 917 80===========output like120 10110091Dev |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
theboyholty
Posting Yak Master
226 Posts |
Posted - 2011-08-03 : 05:04:14
|
| Honestly its not difficult. Google 'TOP N'---------------------------------------------------------------------------------http://www.mannyroadend.co.uk The official unofficial website of Bury Football Club |
 |
|
|
Divyanshu
Starting Member
2 Posts |
Posted - 2011-08-03 : 05:04:22
|
| i got the solu..select top 4 marks from table_nameorder by extension descthanx khtanDev |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-08-03 : 05:50:44
|
quote: Originally posted by Divyanshu i got the solu..select top 4 marks from table_nameorder by extension descthanx khtanDev
why are you ORDER BY extension ?shouldn't it be ORDER BY marks ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|