Subject | Re: [firebird-support] drop table XX cascade |
---|---|
Author | Florian Hector |
Post date | 2004-09-27T11:06:09Z |
> Is the functionlaity CASCADE is supported in dropYou have to define the constraint with the desired CASCADE action. If you
> table.
>
> i.e. drop table <table_name> cascade
>
> Note : CASCADE in drop table will remove associated
> child table constraints. (FK constraint)
then delete a master, the detail will be treated according to your
constraint definition.
Example:
ALTER TABLE MyTableDetail ADD CONSTRAINT FK_TableMasterID FOREIGN KEY
(DetailMasterID) REFERENCES MyTableMaster (ID) ON DELETE CASCADE;
would delete the detail record if the master record was deleted.
Florian