OQL Limit Clause
Last modified: April 20, 2023
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:
|
|
Feedback
Was this page helpful?
Glad to hear it! Thank you for your response.
Sorry to hear that. Please tell us how we can improve.