15.00 - PRIMARY KEY Constraints Versus UNIQUE Constraints - Teradata Database

Teradata Database SQL Data Definition Language Detailed Topics

Product
Teradata Database
Release Number
15.00
Content Type
Programming Reference
Publication ID
B035-1184-015K
Language
English (United States)

PRIMARY KEY Constraints Versus UNIQUE Constraints

UNIQUE and PRIMARY KEY constraints can only be defined on a column set that is also constrained to be NOT NULL.

To create a composite, or multicolumn, primary key for a table, you must specify the PRIMARY KEY constraint at the table level, not the column level.

Both UNIQUE and PRIMARY KEY constraints can be defined on a UDT column.

Teradata Database also supports the related constraints UNIQUE INDEX and UNIQUE PRIMARY INDEX.