OFFSET with FETCH
Description
The OFFSET
and FETCH
clauses are used for pagination in Oracle SQL, allowing to skip a specific number of rows and fetch the next set of rows.
Syntax
OFFSET n ROWS: Skips the first
n
rows.FETCH NEXT m ROWS ONLY: Fetches the next
m
rows after skippingn
rows.
Example
Suppose we have an employees
table and want to retrieve rows 11 to 20 ordered by employee_id
.
Last updated
Was this helpful?