cheesetaco
cheesetaco

Reputation: 761

Add label to existing node with Cypher

How can I add a label to an existing node using a Cypher query?

Upvotes: 60

Views: 39536

Answers (1)

Stefan Armbruster
Stefan Armbruster

Reputation: 39915

That's in the reference docs, see http://docs.neo4j.org/chunked/stable/query-set.html#set-set-a-label-on-a-node, you need to use set to a add a label to a existing node:

match (n {id:desired-id})
set n :newLabel
return n

Upvotes: 108

Related Questions