neo4j - Delete node with all incoming and outgoing relationships -
I want to delete the node with all incoming and outgoing relationships.
This incoming and outgoing relationship is optional. (T: Teacher) - [: Tech] - & gt; (S: Students) (S: Students) - [: ATTENDS] - & gt; (C: class)
Alternate relation with the teacher of the student node and an alternative relationship with the class.
I want to delete the student node with {id: 1}.
I know how to remove all nodes and relationships:
matte (n) optical match (n) - [r] - () DELETE n, r < / code> but not able to convert it to a specific node. help please.
just add discriminatory property in the first match section
Matt ( S: Students {ID: 1}) Alternative matches- [R] - () DELETE r, s If instead instead of id is an internal node ID And you do not have a fixed asset, then matches (where) ID ID = 1 alternative matches- [R] - () DELETE r, s It is irregular and should usually work to capture the nodes from their internal ID. Interpretation is.
Comments
Post a Comment