# How to 'duplicate' a node

**URL:** <https://community.neo4j.com/t/how-to-duplicate-a-node/54001>\
**Category:** Cypher\
**Tags:** cypher\
**Created:** [March 27, 2022, 6:38pm UTC](https://community.neo4j.com/t/how-to-duplicate-a-node/54001 "2022-03-27T18:38:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![paolodipietro58](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/paolodipietro58/32/21045_2.png) [@paolodipietro58](https://community.neo4j.com/u/paolodipietro58)\
**Post date:** [March 27, 2022, 6:38pm UTC](https://community.neo4j.com/t/how-to-duplicate-a-node/54001/1 "2022-03-27T18:38:53Z")

</div>

Running community edition 4.3.2 on Ubuntu 20.04

Hi all,

I have the following question:

How can I duplicate a node, in a new node with another name, but maintaining all the properties?  
Or, in orhet word, how can I duplicate the name changing the name of the node?

Example:

```auto
MATCH (p:Person)

CREATE (n:Node)
    SET n = {p}

```

---

<div class="post-metadata">

**Author:** ![glilienfield](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/glilienfield/32/27534_2.png) [@glilienfield](https://community.neo4j.com/u/glilienfield)\
**Post date:** [March 27, 2022, 7:26pm UTC](https://community.neo4j.com/t/how-to-duplicate-a-node/54001/2 "2022-03-27T19:26:21Z")

</div>

This seems to work. It creates the new node will all the properties of the existing node, then overwrites a property (or more if you want, or add new ones).

match(n:Test{id:100})  
with n  
create (m:Test)  
set m = n  
set m.name = 'new name'  
return m
