cancel
Showing results for 
Search instead for 
Did you mean: 

A small question about deleting a node with its relations

verachkaverachk
Graph Buddy

Hello,
I have the following connected nodes:

I want to try to delete the node I've marked (in the picture) but it doesn't have a name (you can see the properties down the photo) it has only id and delay, which query can help me delete this specific node and his relations?
(the query I've put above is just an example of the one I took from the neo4j site but wasn't sure how to change it to what I wanted)
Thank u and have a lovely day!

1 ACCEPTED SOLUTION

Cobra
Ninja
Ninja

Hello @verachkaverachka

You can use id() function:

MATCH (n)
WHERE id(n) = 22
DETACH DELETE n

Regards,
Cobra

View solution in original post

2 REPLIES 2

Cobra
Ninja
Ninja

Hello @verachkaverachka

You can use id() function:

MATCH (n)
WHERE id(n) = 22
DETACH DELETE n

Regards,
Cobra

verachkaverachk
Graph Buddy

Great! thank u so much!!