16.10 - Column and Table Constraints - Teradata Database

Teradata Database SQL Data Types and Literals

prodname
Teradata Database
vrm_release
16.10
created_date
June 2017
category
Programming Reference
featnum
B035-1143-161K

You can specify constraints during table creation and modification.

Column constraints apply to single columns as a part of the column definition. Column constraints include:

  • CHECK constraint definition clause on a single column
  • PRIMARY KEY constraint definition clause on a single column
  • REFERENCES constraint definition clause on a single column
  • UNIQUE constraint definition clause

Table constraints apply to multiple columns. Table-level constraints include:

  • CHECK constraint definition clause on multiple columns
  • REFERENCES constraint definition clause on multiple columns
  • PRIMARY KEY constraint definition clause on multiple columns
  • UNIQUE constraint definition clause on multiple columns
  • FOREIGN KEY constraint definition clause

    FOREIGN KEY constraint definitions must also specify a REFERENCES clause.

The full syntax for constraints is in “ALTER TABLE” and “CREATE TABLE” in SQL Data Definition Language.