Commit a8a6c67a authored by unknown's avatar unknown

Document LIMIT n,-1 possibility.

parent a6c6c731
...@@ -33784,6 +33784,13 @@ The offset of the initial row is 0 (not 1): ...@@ -33784,6 +33784,13 @@ The offset of the initial row is 0 (not 1):
mysql> SELECT * FROM table LIMIT 5,10; # Retrieve rows 6-15 mysql> SELECT * FROM table LIMIT 5,10; # Retrieve rows 6-15
@end example @end example
To retrieve all rows from a certain offset upto the end of the result set,
you can use -1 for the second parameter:
@example
mysql> SELECT * FROM table LIMIT 95,-1; # Retrieve rows 96-last.
@end example
If one argument is given, it indicates the maximum number of rows to return: If one argument is given, it indicates the maximum number of rows to return:
@example @example
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment