15.10 - UNIQUE - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

Teradata Database
December 2015
Programming Reference

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.