I have nodes that have first name. I want to update all of the names John to Johan. Is there a difference between this two queries? The end result seems the same to me.
Query 1
MATCH (p:Person)
WHERE p.name= "John"
SET p += {name: "Johan"};
Query 2
MATCH (p:Person)
WHERE p.name= "John"
SET p.name="Johan";
I've run the PROFILE
for both queries, and they are rather similar.
PROFILE MATCH (p:Person) WHERE p.name= "John" SET p += {name: "Johan"};
PROFILE MATCH (p:Person) WHERE p.name= "John" SET p.name="Johan";