AFAIK you will have to drop each foreign key and recreated it with the new constraints.
ALTER TABLE "sirius"."TestTable" DROP FOREIGN KEY "FKTestTable"; ALTER TABLE "sirius"."TestTable" ADD CONSTRAINT "FKTestTable" NOT NULL FOREIGN KEY ( "RT_ID" ASC ) REFERENCES "dba"."RefTable ( "RT_ID" ) ON UPDATE CASCADE ON DELETE CASCADE;
You might be able to write a generic script the uses informations about the defines foreign keys, generate the ALTER statements and execute them (EXECUTE IMMEDIATE). While surely it's not a trivial task, that should be possible (YMMV).
Alternatively you could unload the structure to a reload.sql file and modify it accordingly for that task.
answered 19 Oct '12, 08:47