I am generating nodes in a neo4j database and want to remove those that have no relationships. What is the best cypher instruction to do this?
Try
MATCH (n)
WHERE size((n)--())=0
DELETE (n)
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