UNIQUE Constraints
UNIQUE constraints specify that the column set they modify must contain unique values. Teradata Database implements UNIQUE constraints as either a unique primary index, a unique secondary index, or as a single‑table join index.
The following rules apply to UNIQUE constraints:
Otherwise, it is possible for a single null to be inserted into a uniquely constrained column. The semantics of a unique null “value” are uncertain at best, and almost certainly violate the intent of the uniqueness constraint.
The following table explains the column limits for column‑level and table‑level primary key constraints.
IF the UNIQUE constraint is … |
THEN you must define it at this level … |
simple, or defined on a single column |
column. You can define a simple UNIQUE constraint at table‑level, but there is no reason to do so. |
composite, or defined on multiple columns |
table. Defining a table‑level constraint is the only way you can create a multicolumn UNIQUE constraint. |