I'm trying to delete names from all nodes using:
MATCH (n)
DELETE n:Name
But I get the error in Memgraph Lab that reads:
Query failed
Edges, vertices and paths can be deleted.
So how do I then delete label in every node?
The DELETE
clause in is used to delete nodes and relationships, not labels or properties. If you want to remove a label from every node, you should use the REMOVE
clause:
MATCH (n:Name)
REMOVE n:Name