By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,419 Members | 1,648 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,419 IT Pros & Developers. It's quick & easy.

Return records 5 thru 10

100+
P: 219
I realize that mySQL uses the Limit 5,10 type functionality, but I need to retrieve only records 5 thru 10 in my query.

I'm assuming I need to use TOP....

I can do something like this, but I am not going to certainly get the records I need.
SELECT TOP 5 from TABLE order by FIELD DESC

I'm doing this to create some pagination on my web application search results.
May 14 '09 #1
Share this Question
Share on Google+
2 Replies


100+
P: 142
Hey, Try this.

Select Top 5 from Table where Field In(select Top 10 Field from Table order by Field) order by Field Desc
May 15 '09 #2

100+
P: 219
Thanks that'll do the trick!
May 15 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.