Meaning: the syntax of the mySql limit function is SELECT * FROM table LIMIT [offset,] rows | rows OFFSET offset. LIMIT accepts one or two numeric arguments, which must be integer constants.
The LIMIT clause can be used to force a SELECT statement to return a specified number of rows.
Accepts one or two numeric arguments, which must be integer constants. If two parameters are supplied, the first parameter specifies the offset of the first row of records to be returned, and the second parameter specifies the maximum number of rows of records to be returned.
Expanded:
The initial record row has an offset of 0 (instead of 1): for compatibility with PostgreSQL, MySQL also supports the following syntax: LIMIT # OFFSET #.
mysql> SELECT * FROM table LIMIT 5,10; //Retrieve record rows 6-15.
In order to retrieve all record rows from a given offset to the end of the record set, the second parameter can be specified as -1:
mysql> SELECT * FROM table LIMIT 95, -1; // Retrieve record rows 96-last. //After extensive user validation, the LIMIT parameter cannot have a negative number, not even -1.