The SET clause updates node labels and properties on nodes or relationships. It commonly follows MATCH and WHERE to identify existing graph elements before changing them. section 3.1.4
Use SET to make several kinds of graph updates:
- Apply a map of properties with +=; this preserves existing properties while adding or updating the supplied entries. section 3.1.4
- Replace all existing properties with a supplied map by using = instead of +=. section 3.1.4
- Add secondary node labels, such as Student or Employee, to create semantically distinct retrieval groups. section 3.1.4
Updating a person
MATCH (t:Person) WHERE t.name = 'Satish' SET t.interest = 'Gardening', t.hungry = True
