Add label to existing node with Cypher

cheesetaco picture cheesetaco · Feb 7, 2014 · Viewed 25.3k times · Source

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

Answer

Stefan Armbruster picture Stefan Armbruster · Feb 7, 2014

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