15.10 - UNIQUE - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

prodname
Teradata Database
vrm_release
15.10
created_date
December 2015
category
Programming Reference
featnum
B035-1144-151K

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” earlier in this table).

Teradata Database 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.