且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从MySQL中的第x行开始获取所有行

更新时间:2023-10-25 09:07:10

根据文档:

要检索从某个偏移量到结果集结尾的所有行,可以为第二个参数使用较大的数字.该语句检索从第96行到最后一行的所有行:

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;

这是MyISAM表最多可以容纳的最大行,2 ^ 64-1.

This is the maximum rows a MyISAM table can hold, 2^64-1.

MyISAM表中的行数限制为2 ^ 32(〜4.295E + 09).如果使用--with-big-tables选项构建MySQL,则行限制将增加到(2 ^ 32)^ 2(1.844E + 19)行.请参见第2.16.2节典型配置选项".使用此选项构建用于Unix和Linux的二进制发行版.

There is a limit of 2^32 (~4.295E+09) rows in a MyISAM table. If you build MySQL with the --with-big-tables option, the row limitation is increased to (2^32)^2 (1.844E+19) rows. See Section 2.16.2, "Typical configure Options". Binary distributions for Unix and Linux are built with this option.