Neo4j Delete a RelationshipDeleting relationship is as simple as deleting nodes. Use the MATCH statement to match the relationships you want to delete. You can delete one or many relationships or all relationships by using one statement. Example: Delete the relationship named "PLAYER_OF" from the database: Output: The above statement will match all Raul nodes that have a relationship type of PLAYER_OF with an Itly node. Delete All Relationships related to a NodeThere is a method to delete a node and all relationships related to that node. Use the DETACH DELETE statement: Example: Output: This will delete the node "Kohli" where name is "Virat Kohli" with all its relationship. Delete Whole DatabaseTo delete all database use the DETACH DELETE statement without using a filter. Next TopicNeo4j Read Clauses |