删除所有 MATCH (n) DETACH DELETE n 查询Neo4j中所有关系类型名称 MATCH (n)-[r]-(m) RETURN DISTINCT TYPE(r); 检查关系 RETURN EXISTS( (:Person {userId: {0}})-[:KNOWS]-(:Person {userId: {1}}) ) 检查两个节点之间是否存在关系,可以设置关系方向。 参考: How to return relationship type with Neo4J’s Cypher queries?RETURNDELETETest if relationship exists in neo4j / spring data