Unique constrains accept an optional nulls distinct modifier to specify that one null value does not rule out other null values in the same column of the constraint.
CREATE TABLE … (
…,
UNIQUE NULLS DISTINCT (…)
)Implementation Defined Behavior
The default null treatment of unique constraints is implementation defined (ID106). Note that nulls not distinct unique constraints may still treat null values as distinct from each other for rows where all constraint columns are null (IA201)0
- Doesn’t support
null-able columns in unique constraints (T591)
Related
Normative References
The nulls distinct specification is part of the optional feature F292, “UNIQUE null treatment”.
Note that SQL:2016 specifies the behaviour of nulls distinct as the only way to cope with null values in unique constraints. In the mentioned draft the default behaviour is implementation defined.

