I have a node, and I want to delete all of the relationships for that node. I've tried to use MATCH (node) DELETE node;
but I get an error. What am I doing wrong?
Asked
Active
Viewed 23 times
0

KWriter
- 1,024
- 4
- 22
1 Answers
0
Cypher prevents accidental deletion of relationships. You need to use the DETACH
keyword, which will remove relationships from a node you are deleting. The following should work and delete everything in the database:
MATCH (node) DETACH DELETE node;

KWriter
- 1,024
- 4
- 22