We have already discussed creating UNIQUE constraint operations with examples within the preceding bankruptcy. In this bankruptcy, we can talk losing UNIQUE constraint operation with examples.
Neo4j CQL offers "DROP CONSTRAINT" command to delete present Unique constraint from a node or courting belongings.
Following is the syntax for dropping a UNIQUE constraint in Neo4j.
DROP CONSTRAINT ON (node:label) ASSERT node.id IS UNIQUE
Following is a pattern Cypher Query to take away the UNIQUE constraint on the assets id.
DROP CONSTRAINT ON (n:player) ASSERT n.id IS UNIQUE
To execute the above query, carry out the subsequent steps −
Step 1 − Open the Neo4j laptop App and begin the Neo4j Server. Open the integrated browser app of Neo4j the use of the URL http://localhost:7474/ as proven inside the following screenshot.
Step 2 − Copy and paste the preferred query in the dollar set off and press the play button (to execute the query) highlighted inside the following screenshot.
On executing, you will get the subsequent end result.