OFFSET clause is used to specify the cursor or the number of records that should be skipped before returning results from the query. This clause is primarily used when we want to break the set of records into various pages, or batches.
Example: Let’s say we want to show the list of clinics on a page. And we want to apply pagination, so each page contains a maximum of 25 clinics.
The SOQL query for Page 1:
The SOQL query for Page 2:
The SOQL query for Page 3:
The SOQL query for Page n:
We can easily see how it is straightforward to break records using the