PRIMARY KEY - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

The column is the primary key for the table. The column must be defined as NOT NULL.

For an unnamed PRIMARY KEY column constraint, use this syntax:

PRIMARY KEY

Use the column attribute form of PRIMARY KEY when the constraint applies only to the column and the primary key for the table is defined only on the single column.

A tables can have only one primary key. To specify primary keys for referential integrity relationships with other tables, give the column the UNIQUE constraint.

System-defined secondary or single-table join indexes used to implement this constraint are included in the maximum of 32 secondary and join indexes per table.

A PRIMARY KEY constraint is a unique secondary index or UPI for nontemporal tables and a single-table join index for most temporal tables. For details and examples of PRIMARY KEY constraint on temporal tables, see Teradata Vantage™ - Temporal Table Support, B035-1182.

You cannot include a column with the JSON data type in a PRIMARY KEY.

You cannot add a PRIMARY KEY constraint on a row-level security constraint column.

CONSTRAINT constraint_name
For a named PRIMARY KEY column constraint, use this syntax:
CONSTRAINT constraint_name PRIMARY KEY