MySQL: how to select everything except first 10 re

2020-03-03 07:24发布

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?)

2条回答
祖国的老花朵
2楼-- · 2020-03-03 07:54

Better get used to LIMIT condition because you can use it also for pagination.

查看更多
男人必须洒脱
3楼-- · 2020-03-03 08:13

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;
查看更多
登录 后发表回答