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 |
|
masterdineen
Aged Yak Warrior
550 Posts |
Posted - 2010-04-21 : 04:28:40
|
| Is there a way to select bottom 10 records from a tablejust like you can select top 10 * from tableKind RegardsRobMCTS certified |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-04-21 : 04:32:45
|
just add a ORDER BY clauseORDER BY somecol ASCorORDER BY somecol DESCdepending on your definition of what is TOP and what is BOTTOM KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-04-21 : 04:33:27
|
select top 10 * from tablemeans not that there is a reliable, reproducible result unless you specify an order by clause. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-04-21 : 05:41:38
|
quote: Originally posted by masterdineen Is there a way to select bottom 10 records from a tablejust like you can select top 10 * from tableKind RegardsRobMCTS certified
bottom top etc makes sense only when you specify in terms of a field. so question is on what basis you want bottom 10. posting some data sample will help------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|