ADD UNIQUE (column_name) - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
ncd1596241368722.ditamap
dita:ditavalPath
hoy1596145193032.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™
A column set as the UNIQUE constraint column set for table_name. The columns must be defined as NOT NULL.
If you specify more than one column_name, the UNIQUE column set is based on the combined values of the specified column name.
For an unnamed UNIQUE table constraint, use this syntax:
     ADD UNIQUE (column_name)

You cannot add a UNIQUE constraint on a column with the JSON data type.

CONSTRAINT name
For a named UNIQUE table constraint, use this syntax:
     ADD CONSTRAINT constraint_name UNIQUE (column_name)
A UNIQUE table constraint can be defined on a maximum of 64 columns.