In MySQL, the LIMIT clause allows you to specify a limit and offset to extract a subset of rows from a table. However, common situations require retrieving an undetermined number of rows starting at a specific offset.
MySQL’s LIMIT clause manual provides a solution for this scenario. To offset rows from the beginning of the table without specifying a limit, use a large number as the second argument to the LIMIT clause. For example, the following query retrieves all rows from row 96 to the end of the result set:
<code class="language-sql">SELECT * FROM tbl LIMIT 95, 18446744073709551615;</code>
This value (18446744073709551615) is the maximum value of a 64-bit signed integer, which effectively means "unlimited".
The above is the detailed content of How to Retrieve All Records After a Specific Offset in MySQL?. For more information, please follow other related articles on the PHP Chinese website!