PRIMARY KEY Constraints Versus UNIQUE Constraints - Analytics Database - Teradata Vantage

SQL Data Definition Language Detailed Topics

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
vuk1628111288877.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1184
lifecycle
latest
Product Category
Teradata Vantage™

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.

Vantage also supports the related constraints UNIQUE INDEX and UNIQUE PRIMARY INDEX.