17.10 - Column and Table Constraints - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1143-171K
Language
English (United States)

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 Teradata Vantageā„¢ - SQL Data Definition Language Syntax and Examples, B035-1144