Prev |  | Next

## 16.9. Skip

`SKIP` enables the return of only subsets of the total result. By using `SKIP`, the result set will trimmed from the top. Please note that no guarantees are made on the order of the result unless the query specifies the `ORDER BY` clause.

Graph

### 16.9.1. Skip first three

To return a subset of the result, starting from third result, use this syntax:

Query

    START n=node(3, 4, 5, 1, 2)
    RETURN n
    ORDER BY n.name
    SKIP 3

The first three nodes are skipped, and only the last two are returned.

Result

n
2 rows, 1 ms
`Node[1]{name->"D"}`
`Node[2]{name->"E"}`

### 16.9.2. Return middle two

To return a subset of the result, starting from somewhere in the middle, use this syntax:

Query

    START n=node(3, 4, 5, 1, 2)
    RETURN n
    ORDER BY n.name
    SKIP 1
    LIMIT 2

Two nodes from the middle are returned

Result

n
2 rows, 0 ms
`Node[4]{name->"B"}`
`Node[5]{name->"C"}`

Copyright © 2011 Neo Technology

Prev | Up | Next
| Home |