Neo4j Skip Clause - Neo4j

What is the use of skip clause in Neo4j?

SKIP clause is used for defining from which row to start including the rows in the output.

Example

Before proceeding with the example, create 5 nodes as shown below.

Below is a sample Cypher Query which returns all the nodes in the database skipping the first 3 nodes.

To execute the above query, carry out below steps

Step 1− Open the Neo4j desktop App and start the Neo4j Server. Open the built-in browser app of Neo4j using the URL http://localhost:7474/ as shown in below screenshot.

browser app

Step 2− Copy and paste the desired query in the dollar prompt and press the play button (to execute the query) highlighted in below screenshot.

skip

Result

skip_result

Skip UsingExpression

Records of a result can be skipped using an expression.

Example

Below is a sample Cypher Query which uses the SKIP clause with an expression.

Step 1− Open the Neo4j desktop App and start the Neo4j Server. Open the built-in browser app of Neo4j using the URL http://localhost:7474/ as shown in below screenshot.

browser app

Step 2− Copy and paste the desired query in the dollar prompt and press the play button (to execute the query) highlighted in below screenshot.

skip_expression

Result

skip_expression_result

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Neo4j Topics