9.3. Limit
LIMIT
enables the return of only subsets of the total result.
Return first part
To return a subset of the result, starting from the top, use this syntax:
Query.
MATCH (n) RETURN n LIMIT 3
The top three items are returned by the example query.
Result
n |
---|
3 rows |
|
|
|
Try this query live. create (_0 {`name`:"D"}) create (_1 {`name`:"E"}) create (_2 {`name`:"A"}) create (_3 {`name`:"B"}) create (_4 {`name`:"C"}) create _2-[:`KNOWS`]->_3 create _2-[:`KNOWS`]->_4 create _2-[:`KNOWS`]->_0 create _2-[:`KNOWS`]->_1 match (n) return n limit 3