Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.

# Thread: ORDER BY DESC LIMIT Question

1. ## ORDER BY DESC LIMIT Question

ORDER BY .... DESC LIMIT 4

I understand how this works. It returns the last, in this case 4, whatevers. Is there a way to get the next to the last 4? In other words, in a table that has 100 rows, could this be written to return rows 93-96, instead of 97-100. This is a dynamic table, where the row numbers are incremented as more information is added.

Thanks,
Stan

• I found my answer, I just hadn't looked enough. The solution to my question is:

DESC LIMIT 4, 4

For others that may be looking for help, this example returns 4 whatevers, starting 4 from the last. The first 4 (after DESC LIMIT) is the number to return. The second 4 is the starting point.

Stan

•

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•