Easy way to remove relationships by ID in Neo4j Cypher?

Using Match and Where can I delete relationships by ID.

Match ()-[r]-() Where ID(r)=1 Delete r 

Is there an easier way?

+7
neo4j nosql graph-databases cypher
source share
2 answers

Using the old syntax, but which will be removed in a future version.

 start r=rel(id) delete r; 
+6
source share

I use

 MATCH ()-[r]-() WHERE id(r)=49 DELETE r 
+2
source share

All Articles