# Read and Write Operations with Cypher

**URL:** <https://community.neo4j.com/t/read-and-write-operations-with-cypher/22949>\
**Category:** Neo4j Website\
**Created:** [August 5, 2020, 4:17pm UTC](https://community.neo4j.com/t/read-and-write-operations-with-cypher/22949 "2020-08-05T16:17:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adam\_cowley](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/adam_cowley/32/145_2.png) [@adam\_cowley](https://community.neo4j.com/u/adam_cowley)\
**Post date:** [August 5, 2020, 4:17pm UTC](https://community.neo4j.com/t/read-and-write-operations-with-cypher/22949/1 "2020-08-05T16:17:55Z")

</div>

Maybe you already have a node or relationship in the data, but you want to modify its properties. You can do this by matching the pattern you want to find and using the `SET` keyword to add, remove, or update properties.

Using our example thus far, we could update Jennifer’s node to add her birthday. The next Cypher statement shows how to do this. First, we need to find our existing node for Jennifer. Next, we use `SET` to create the new property (with syntax `variable.property`) and set its value. Finally, we can return Jennifer’s node to ensure that the information was updated correctly.

```cypher
MATCH (p:Person {name: 'Jennifer'})
SET p.birthdate = date('1980-01-01')
RETURN p
```

For more information on using date() and other temporal functions, you can visit the developer manual.

If we now wanted to change her birthday, we could use the same query above to find Jennifer’s node again and put a different date in the `SET` clause.

We could also update Jennifer’s `WORKS_FOR` relationship with her company to include the year that she started working there. To do this, you can use similar syntax as above for updating nodes.

```cypher
MATCH (:Person {name: 'Jennifer'})-[rel:WORKS_FOR]-(:Company {name: 'Neo4j'})
SET rel.startYear = date({year: 2018})
RETURN rel
```

If we wanted to return a graph view on the above query, we could add variables to the nodes for p:Person and c:Company and write the return line as RETURN p, rel, c.

* * *
This is a companion discussion topic for the original entry at [https://neo4j.com/developer/cypher/reading-writing/](https://neo4j.com/developer/cypher/reading-writing/)
