Search code examples
neo4jcypher

Neo4j, Cypher: How to update a property name?


I have a set of nodes with a property, myproperty = "James" I want to update that property from (myproperty) to (name).

Is there any way to this with Cypher?


Solution

  • Solved by myself, heres what I did:

    MATCH (n:term)
    SET n.name = n.label
    REMOVE n.label
    RETURN n