OQL Limit Clause
Last modified: May 29, 2024
1 Description
With the LIMIT
clause a portion of the result of a query can be returned.
2 Syntax
The syntax is as follows:
[ LIMIT number ] [ OFFSET number ]
2.1 LIMIT
LIMIT
specifies how many rows must be returned.
2.2 OFFSET
OFFSET
specifies how many rows must be skipped before returning the result rows.
3 Examples
This query retrieves the first ten customers, sorted by their last name:
|
|
This query retrieves all customers, except the first ten, sorted by their last name:
|
|
This query retrieves the 11th to 20th customer, sorted by their last name:
|
|