Example: SHOW TABLE with REFERENCES Constraint - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

Table t1 is created with a referential constraint which specifies that FOREIGN KEY columns (f1 ) reference the unique primary index columns in table good_1. (good_1 is on the Block File System.)

     CREATE TABLE t1 (
       f1 INTEGER NOT NULL
       f2 INTEGER)
     PRIMARY INDEX (f1)
     FOREIGN KEY (f1) REFERENCES good_1;

SHOW TABLE on t1 returns the following CREATE TABLE SQL text.

     SHOW TABLE t1;
     CREATE SET TABLE t1, NO FALLBACK,
        NO BEFORE JOURNAL, NO AFTER JOURNAL (
     f1 INTEGER NOT NULL,
     f2 INTEGER)
     PRIMARY INDEX ( f1 )
     FOREIGN KEY ( f1 ) REFERENCES personnel.good_1( column_1 );