Overview
TheOFFSET is a clause that skips some records from the result set.
Syntax
The basic syntax of theOFFSET clause is shown below:
columns: the columns to be fetched.table_name: a table from which the records will be fetched.OFFSET: a clause that will skip a subset of records.num: the number of records to be skipped.
Example
1. Here, we are creating one new table called oxlafunctions using theCREATE TABLE command and inserting some values into the table using the INSERT command:
- The “LIMIT 5” clause is used to fetch only five records.
- The “OFFSET 2” clause is used to skip the first two records before retrieving the result set of the limit clause.