0

So I have

SELECT * FROM table ORDER BY column DESC LIMIT 100;

What I would like to do is get a set of 100 based on an ... "index?" Basically I would like to get say 50th to 149th or 300th to 399th.

Sorry I just don't know the term for this...

1 Answer 1

0
SELECT * FROM table ORDER BY column DESC LIMIT 100 , 50 ;

You need to use offset. Pass 300 instead of 50 and you will get result set from 300 too 400

Edit: This would get 100 -> 400 as the first value is the start index when using ','

1
  • Thank you for direction, Limit startRow, num or Limit num offset startRow. Note your description is wrong according to the docs.
    – vbbartlett
    Apr 17, 2013 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.