15.10 - Uniqueness Constraints - Teradata Database

Teradata Database SQL Data Types and Literals

prodname
Teradata Database
vrm_release
15.10
category
Programming Reference
featnum
B035-1143-151K

A uniqueness constraint means the table cannot include two or more rows in which the values for the column or set of columns are identical.

Teradata Database supports the following uniqueness constraints:

  • PRIMARY KEY
  • UNIQUE
  • A column or set of columns defined as PRIMARY KEY must also be NOT NULL.

    Teradata Database instantiates a PRIMARY KEY as a unique primary or secondary index.

    Only one PRIMARY KEY can be defined for a table.

    For more details, see:

  • “CREATE TABLE” in SQL Data Definition Language.
  • “Keys” in SQL Fundamentals.
  • “Constraint Specifications” in Database Design.
  • A column or set of columns defined as UNIQUE must also be NOT NULL.

    Teradata Database instantiates UNIQUE as a unique primary or secondary index. One or more columns or sets of columns can be defined as UNIQUE for a table.

    For more details, see:

  • “CREATE TABLE” in SQL Data Definition Language.
  • “Constraint Specifications” in Database Design.