Google Groups

Cannot delete relationship with cypher

Tomas Teicher Apr 28, 2012 9:47 AM
Posted in group: Neo4j
I have tried to delete one of relationships. I am using cypher with syntax from this tutorial

start n = node(21) match n-[r]->()  delete r

but it doesn't work. It got me this error: "expected return clause". The error message is pointed to the word "match"

When I change query to return relationships  instead of delete them, it works: 

start n = node(21) match n-[r]->()  return r

This query return me two rows.
I am using cypher version 1.8

Can anybody help, what can be problem?