You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by "Hamza-Mushtaque (via GitHub)" <gi...@apache.org> on 2023/05/22 20:37:48 UTC

[GitHub] [age] Hamza-Mushtaque commented on issue #934: Updating properties for multiple nodes in a graph database using a single query without specifying each node individually

Hamza-Mushtaque commented on issue #934:
URL: https://github.com/apache/age/issues/934#issuecomment-1557952612

   Yes, you can update properties for multiple nodes without specifying each node individually by using the `MATCH` clause with a condition to select the desired nodes and the `SET` clause to update their properties. Here's an example of how you can achieve this:
   
   ```cypher
   MATCH (n:label4)
   WHERE n.property = "write the value you wanna target" 
   SET n.newProperty = ' write new value you want'
   ```
   
   In the above query, the `MATCH` clause selects all nodes with the label `label4`. The `WHERE` clause filters the nodes based on their  property. The `SET` clause then updates the `newProperty` for the selected nodes to the specified value ('new value' in this example).
   
   I hope this helps you.


-- 
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-unsubscribe@age.apache.org

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