Rules for Assigning Columns as FOREIGN KEYS - Advanced SQL Engine - Teradata Database

SQL Fundamentals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
zwv1557098532464.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1141
lifecycle
previous
Product Category
Teradata Vantage™

The FOREIGN KEY columns in the referencing table must be identical in definition with the keys in the referenced table. Corresponding columns must have the same data type and case sensitivity.

  • For standard referential integrity, the COMPRESS option is not permitted on either the referenced or referencing column(s).
  • Column level constraints are not compared.
  • A one-column FOREIGN KEY cannot reference a single column in a multicolumn primary or unique key—the foreign and primary/unique key must contain the same number of columns.