delete a node in neo4j code example
Example 1: neo4j delete everything in database
MATCH (n)
DETACH DELETE n
Example 2: delete relationship neo4j
MATCH (n { name: 'Andy' })-[r:KNOWS]->()
DELETE r
Example 3: neo4j delete node by id
MATCH (p:other) where p.tag_id="792e93e4-84b2-47ba-8961-e284a04b272b"
DELETE p
Example 4: neo4j delete node by id
MATCH (p:Person) where ID(p)=1
OPTIONAL MATCH (p)-[r]-() //drops p's relations
DELETE r,p