删除节点 / 关系
DELETE <node-name-list>DELETE <node1-name>,<node2-name>,<relationship-name>
//删除关系
match (u1:User)-[r]->(u2:User)
where u1.id = 8
delete r
//删除节点
match (u:User)
where u.id = 5
delete u //删除节点之前,必须先删除关系
//删除节点和其所有关系
match (u:User)
where u.id = 8
detach delete u
//删除数据库中的所有节点
match(n)
detach delete u
1380

被折叠的 条评论
为什么被折叠?



