版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/chengyuqiang/article/details/102657539
MATCH (n:Person) RETURN n;
MATCH(p:Person) DELETE p;
Neo.ClientError.Schema.ConstraintValidationFailed: Cannot delete node<1153>, because it still has relationships. To delete this node, you must first delete its relationships.
MATCH (p1:Person)-[r:LOVES]-(p2:Person)
DELETE p1,p2,r
注意,delete子句的格式是DELETE <node1-name>,<node2-name>,<relationship-name>
剩下的实体关系
MATCH(p:Person)
DETACH DELETE p;