I am trying to execute the following query:
MATCH (movie:Movie {title:"test"})-[r]-() DELETE movie, r
delete: the movie node and all its relationships. This is all good, except that the request does not have any relationship, it cannot match the movie. I tried with the OPTIONAL MATCH, but no luck.
I am looking for a way to DELETE a movie node, regardless of whether it has a relationship or not, but if it is, DELETE them.
source share