Cypher provides two clauses to delete data. They are as follows:
To remove a label from a node, you must use the REMOVE
clause. The syntax is similar to the one for the SET
clause, as shown in the following query:
MERGE (b:User {name: "Jack", surname: "Smith"}) REMOVE b:Inactive:MustConfirmEmail
This query removes the labels Inactive
and MustConfirmEmail
from the node that was matched. Note that we have chained the labels using the colon separator. If the node already doesn't have one or all of the labels specified, this query will not fail; it will only remove the labels it can remove.