开发者

MySQL LIMIT/OFFSET: get all records except the first X

I want to query all record开发者_如何学Gos from number 50 and up. So instead of doing something like LIMIT 49, 99999 I want to know if there is an official way.


No, sorry. From the MySQL Documentation:

To retrieve all rows from a certain offset up to the end of the result set, you can use some large number for the second parameter. This statement retrieves all rows from the 96th row to the last:

SELECT * FROM tbl LIMIT 95,18446744073709551615;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜