Return the nth record from MySQL query

Viewed 77383

I am looking to return the 2nd, or 3rd, or 4th record from a MySQL query (based on a query by ID ascending)

The problem being, I won't know the ID, only that it is the 3rd row in the query.

6 Answers

SELECT * FROM table ORDER BY ID LIMIT n-1,1

It says return one record starting at record n.

Related