Constraints
UNIQUE constraints prevent duplicate property values across all nodes with a given label.
CREATE CONSTRAINT ON (n:Person) ASSERT n.email IS UNIQUEAttempting to create a node with a duplicate value will return a typed error.
Drop a constraint#
DROP CONSTRAINT ON (n:Person) ASSERT n.email IS UNIQUEList constraints#
CALL db.constraints()See Also#
- Indexes — performance indexes
Try it
Open ↗⌘↵ to run
Loading engine…