+1 vote
in Neo4j by
How can you delete databases in Neo4J?

1 Answer

0 votes
by

Delete commands in Neo4J:

Delete a single node:

MATCH (n:Person { name: 'UNKNOWN' })  

DELETE n  

Delete all nodes and relationships:

MATCH (n)  

DETACH DELETE n  

Delete a node with its relationship:

MATCH (n { name: 'Andres' })  

DETACH DELETE n  

Delete relationships only:

MATCH (n { name: 'Andres' })-[r:KNOWS]->()  

DELETE r  

...