Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Neo4J get node by ID

Tags:

neo4j

I am using neo4j for one of my project, there's a node which only has a single property as name, I want to get that node using ID, it already has a ID but when I use this code

MATCH (s:SKILLS{ID:65110}) return s

It returns nothing, heres my node

enter image description here

If the query is wrong then how do I query it using the number

like image 439
Niraj Chauhan Avatar asked Mar 13 '14 05:03

Niraj Chauhan


1 Answers

MATCH (s) WHERE ID(s) = 65110 RETURN s 

The ID function gets you the id of a node or relationship. This is different from any property called id or ID that you create.

like image 164
Damon Horrell Avatar answered Jan 04 '23 17:01

Damon Horrell