Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Tom's package for UPDATE CASCADE

963732Aug 25 2014 — edited Aug 25 2014

OK I have downloaded Thomas Kyte's package for UPDATE CACADE from The Tom Kyte Blog: http://asktom.oracle.com/tkyte/update_cascade now I want to implement it I have already executed UC.sql, the FOREIGN KEY CONSTRAINT I wand to add for example is :

ALTER TABLE customer ADD CONSTRAINT customer_address_id_fkey FOREIGN KEY (address_id) REFERENCES address(address_id) ON UPDATE CASCADE;

For this my understanding is that I will fir add the constraint as under :

ALTER TABLE customer ADD CONSTRAINT customer_address_id_fkey FOREIGN KEY (address_id) REFERENCES address(address_id);

Then I will execute :

exec update_cascade.on_table('address');

As column 'address_id' is the PRIMARY KEY in table 'address'

I know the Tom's article is pretty straight forward but I just want to make sure I do it right !!

Another question is that if I want to undo it I will have to remove the trigger placed on table 'address' by tom's package so how would I find out the name of the trigger to drop it ?

Thank you very much.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 22 2014
Added on Aug 25 2014
1 comment
779 views