Omar-Saad commented on issue #934:
URL: https://github.com/apache/age/issues/934#issuecomment-1566035849

   To update and add a new property to all nodes labeled `label4`, you can use 
the following query:
   
   ```
   MATCH (n:label4)
   SET n.newProperty = 'new value', n.anotherProperty = 'another value'
   RETURN n
   ```
   Please note that this query will not create a new node if there are no nodes 
in the graph with the label `label4`.
   
   If you want to create a new node or update existing ones, you can use the 
`MERGE` clause:
   
   ```
   MERGE (n:label4)
   SET n.newProperty = 'new value', n.anotherProperty = 'another value'
   RETURN n
   ```
   The `MERGE` clause is useful when you want to ensure that a node exists 
before performing any updates or inserts. In this case, the `MERGE` clause will 
create a new node if it doesn't exist with the label `label4`, or update the 
existing nodes if they do.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@age.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to