Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL: how to select everything except first 10 records

How can I select all records except first 10 records from MySQL table?

(I know that limit 10,x selects records from the 10th to x-th, but what should I use instead of x to select all remaining records?)

like image 521
feri baco Avatar asked Jun 02 '13 17:06

feri baco


1 Answers

Use OFFSET. Then you can skip 10 records and select the remaining ones until the end.

Then your query should look like

SELECT field FROM table WHERE (condition) LIMIT 18446744073709551615 OFFSET 10;
like image 154
Lucia Pasarin Avatar answered Sep 18 '22 11:09

Lucia Pasarin