How to get node's id with cypher request?

后端 未结 3 2174
时光取名叫无心
时光取名叫无心 2021-02-18 14:13

I\'m using neo4j and making executing this query:

MATCH (n:Person) RETURN n.name LIMIT 5

I\'m getting the names but i need the ids too. Please

3条回答
  •  后悔当初
    2021-02-18 14:47

    Since ID isn't a property, it's returned using the ID function.

    MATCH (n:Person) RETURN ID(n) LIMIT 5
    

提交回复
热议问题