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.

How to delete an empty node?

Hello everybody. I am new o neo4j so i have some doubts. I am studing it since last month.
In this topic my doubt could be simple, but I try to find in others comunities but I didn't find it.
When I was creating a relationship i make a mistack so in that moment I created an empty node without name nor other attributes. There is only the ID. How can I delete this.
As my model is just to study I delete everything, but if it happened in production I must be able to delete it instead of delete all my model.

Regards, Igor Martins

1 ACCEPTED SOLUTION

Hi @igorbmartins

If you know the id.
The Cypher is like this.

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

View solution in original post

2 REPLIES 2

Hi @igorbmartins

If you know the id.
The Cypher is like this.

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

Thanks, it works properly.
Regards,
Igor Martins