neo4j
Get nodes using multiple ids Cypher query neo4j
To get multiple nodes using multiple ids, you can use the below code. It will filter the nodes based on the ids provided in the WHERE clause.
MATCH (n)
WHERE ID(n) IN [0, 1, 7, 8, 10]
RETURN n
In the above Cypher query, we are getting nodes that have 0, 1, 7, 8, and 10 unique ids. The query will search all nodes that exist in the neo4j graph database and returns the matching nodes from them based on the ids.
Was this helpful?
Similar Posts
- Create one or multiple nodes Cypher query neo4j
- Get all nodes with same label using label name Cypher query neo4j
- Get all related nodes of a node using Cypher query neo4j
- Get all nodes cypher query neo4j
- Delete nodes using Cypher query neo4j
- Sort nodes in descending order Cypher query neo4j
- Sort nodes by id ascending and descending order neo4j Cypher query