UNIQUE - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
wgr1555383704548.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™

No two rows in the table can have the same value in the field. The system uses a unique primary or secondary index to enforce this constraint.

This constraint can only be specified on a single column. To specify UNIQUE on multiple columns, use the UNIQUE definition clause.

You cannot specify a UNIQUE constraint for a QITS column (see QITS_column_name).

Vantage implicitly creates a unique index on any column specified as UNIQUE.

If all of the following conditions are true, then the implicitly defined index is a unique primary index.
  • No explicit primary index is specified
  • No explicit primary key is specified
  • This is the first unique constraint defined for the table

If none of the conditions listed previously is true, then the implicitly defined index is a unique secondary index.