Article ID: 130352
Article Last Modified on 2/11/2000
CREATE DATABASE pr_dbc
CREATE TABLE pr_Paren (cid c(3) PRIMARY KEY, cfld2 c(3))
CREATE TABLE pr_Child (cid c(3) REFERENCES pr_Paren TAG cid, ;
cfld2 c(3), cfld3 c(3))
MODIFY DATABASE && To view the persistant relationship
ALTER TABLE pr_Paren DROP PRIMARY KEYThis command successfully removes the parent table from any and all Persistent Relations in which the table is participating. It also removes the PRIMARY Key index tag from the table. This is not a "safe" method to use because of the scope of its effect.
USE pr_Child DELETE TAG cidThis method breaks the Persistent Relation, but it also deletes the tag in the pr_Child table.
ALTER TABLE-SQL's DROP FOREIGN KEY TAG <Tagname> [SAVE]This command successfully removes the child table from the Persistent Relation and the [SAVE] clause preserves the child table's index tag. Here is an example using the example database:
ALTER TABLE pr_Child DROP FOREIGN KEY TAG cid SAVEIf the SAVE clause is not used, the cid tag is deleted from the pr_Child table.
Additional query words: VFoxWin
Keywords: kbcode KB130352