I am unable to delete relation between two nodes. I am getting this result Returned 0 rows in 252 ms only. my query is:
MATCH (n: Company{ companyName : "Amagi Media Labs"})-[r: HAS_CUSTOMER]-(n: Company{ companyName : "IBN7"} ) delete r RETURN n,r;
How can I write this query.
Help is appreciated.
You want to use different node identifiers for the two nodes you're matching, or it won't match either:
MATCH (n:Company {companyName:"Amagi Media Labs"})-[r:HAS_CUSTOMER]-(m:Company {companyName:"IBN7"})
DELETE r
RETURN n,r;
Update: you can't return the relationship, so you'd only be able to RETURN n, m after the DELETE.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With