MySQL:如何选择除前10条记录外的所有内容
问题描述:
如何从MySQL表中选择除前10条记录以外的所有记录?
How can I select all records except first 10 records from MySQL table?
(我知道limit 10,x
从第10个到第x个选择记录,但是我应该用什么代替x来选择所有剩余的记录?)
(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?)
答
使用OFFSET
.然后,您可以跳过10条记录,然后选择其余的记录,直到结束.
Use OFFSET
. Then you can skip 10 records and select the remaining ones until the end.
然后您的查询应为
SELECT field FROM table WHERE (condition) LIMIT 18446744073709551615 OFFSET 10;