Archives of the TeradataForum
Message Posted: Fri, 02 Jan 2004 @ 11:10:48 GMT
<-- Anonymously Posted: Friday, January 02, 2004 04:23 -->
Excerpt from SQL Vol - 4
Referential Integrity When a Table is Inconsistent
While a table is marked as inconsistent, no updates inserts, or deletes are permitted. The table is fully usable only when the inconsistencies are resolved.
It is possible that the user either intends to or must revert to a definition of a table which results in an inconsistent reference on that table.
The Archive and Restore operations most commonly cause the inconsistencies.
While the Child table is archived, the Parent table can be dropped. When the Child table is restored, the Parent table no longer exists.
The normal ALTER TABLE DROP FOREIGN KEY statement does not work, because the Parent table references cannot be resolved.
A special option of the ALTER TABLE statement which can be used to remove these inconsistent references from a table.
The syntax is:
ALTER TABLE dbname.tname DROP INCONSISTENT REFERENCES
In the above explanation, It is said that "The normal ALTER TABLE DROP FOREIGN KEY statement does not work, because the Parent table references cannot be resolved."
Want to know what is the need to resolve the references when the FOREIGN KEY is being dropped ?
Thanks & Regards...
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|