|Subject||Re: [firebird-support] drop table XX cascade|
> > Is the functionlaity CASCADE is supported in dropWhich is something different from the metadata CASCADE.
> > table.
> > i.e. drop table <table_name> cascade
> > Note : CASCADE in drop table will remove associated
> > child table constraints. (FK constraint)
> You have to define the constraint with the desired CASCADE action. If you
> then delete a master, the detail will be treated according to your
> constraint definition.
> 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.
No, "CASCADE" in DROP TABLE is not supported. You need
to drop FKs (or other constraints, procedures, triggers, views etc)
that use the table, yourself.
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL