Circular References - 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

References can be defined as circular in that Table A can reference Table B, which can reference Table A. At least one set of FOREIGN KEYS must be defined on nullable columns.

If the FOREIGN KEYS in Table A are on columns defined as nullable, then rows can be inserted into Table A with nulls for the FOREIGN KEY columns. After the appropriate rows exist in Table B, the nulls of the FOREIGN KEY columns in Table A can then be updated to contain values that are not null that match the Table B values.