删除 neo4j 1.8 中的所有节点和关系 [英] Delete all nodes and relationships in neo4j 1.8
本文介绍了删除 neo4j 1.8 中的所有节点和关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道这个问题已经被很多人问过了
对于我的研究,这是之前提出的一些问题
2.3.0 之前的版本
匹配 (n)可选匹配 (n)-[r]-()删除 n,r
I know this question is asked by many people already
for my research, here's some questions asked before- How to delete all relationships in neo4j graph?
- https://groups.google.com/forum/#!topic/neo4j/lgIaESPgUgE
But after all, still can't solve our problems,
we just want to delete "ALL" nodes and "ALL" relationshipssuppose delete "ALL" can see there are left 0 nodes 0 properties and 0 relationships
This is the screenshot i took after executing the delete "ALL" suggested by forum
My question still the same, how do delete all nodes and all relationships in neo4j
解决方案As of 2.3.0 and up to 3.3.0
MATCH (n) DETACH DELETE n
Pre 2.3.0
MATCH (n) OPTIONAL MATCH (n)-[r]-() DELETE n,r
这篇关于删除 neo4j 1.8 中的所有节点和关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文