MySQL skip first 10 results

Brian picture Brian · May 13, 2010 · Viewed 100.6k times · Source

Is there a way in MySQL to have the first 10 result from a SELECT query skipped? I'd like it to work something like LIMIT.

Answer

Dominic Rodger picture Dominic Rodger · May 13, 2010

Use LIMIT with two parameters. For example, to return results 11-60 (where result 1 is the first row), use:

SELECT * FROM foo LIMIT 10, 50

For a solution to return all results, see Thomas' answer.