After an all-AMPs copy, copied tables do not have referential constraints. Referential constraints are not copied into the dictionary definition tables, database DBC.ReferencedTbls and database DBC.ReferencingTbls, for either a referenced (parent) or referencing (child) table copied into a Teradata Database. All referential index descriptors are deleted from the archived table header before it is inserted into the copied table.
Reference constraints remain, however, on any table for which the copied table is a referenced table (a parent table) or any table the copied table (as a child table) references. Hence, when either a referenced or a referencing table is copied, the reference may be marked in the dictionary definition tables as inconsistent.
While a table is marked as inconsistent with respect to referential integrity, no updates, inserts or deletes are permitted. The table is fully usable only when the inconsistencies are resolved.
- Use ALTER TABLE DROP INCONSISTENT REFERENCES to drop inconsistent references.
- Use ALTER TABLE ADD CONSTRAINT FOREIGN KEY REFERENCES to add referential constraints to the copied table.
For an all-AMPs copy, REVALIDATE REFERENCES FOR is not applicable to COPY.