Return value after deleting node or relationship in neo4j

I experienced that when I delete some node (which may have relations) or relations in neo4j using the cypher request, it does not give anything in return, as in mysql db.

is there any way that can give confirmation of the number of affected nodes (e.g. the number of node removed) in cypher?

+3
source share
1 answer

The request is executed below (I tried this with neo4j 1.8.1 and 1.9.3 with both the community and the corporate version)

START root=node(1) MATCH root-[r:?]->() WHERE root.Id=12 DELETE r,root return count(root);  

, node , node DELETE a,b,c,node, a, b c - , node.

@PeterNeubauer.:)

+3

Source: https://habr.com/ru/post/1621795/


All Articles