# CREATE CONSTRAINT Requires a property of a label to be unique, or requires every element of the label to satisfy a condition. ## Synopsis
CREATE CONSTRAINT [ constraint_name ] ON label_name ASSERT property IS UNIQUE
CREATE CONSTRAINT [ constraint_name ] ON label_name ASSERT condition

bold keywords · italic placeholders you supply · [ ] optional · ... repeatable. See Syntax conventions.

## Description There are two forms, and they become two different things on disk. **`ASSERT property IS UNIQUE`** becomes an exclusion constraint over the property read: `EXCLUDE USING btree ((properties.'title') WITH =)`. A write whose value already exists is rejected as a conflict. **`ASSERT condition`** becomes a check constraint over the same kind of read: `CHECK ((properties.'age')::integer > 9)`. A write whose row fails the condition is rejected. **The name is optional in both forms.** Left out, one is derived: `