cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

A small question about deleting a node with its relations

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

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

Hello @verachkaverachka

You can use id() function:

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

Regards,
Cobra

Great! thank u so much!!