|
|
 |
|
A
Generic Cascade Update Procedure
Oracle Tips by Mike Ault |
The Cascade Update Procedures
-- The calling trigger has to be of the form:
CREATE OR REPLACE TRIGGER cascade_update_<tabname>
AFTER UPDATE OF <column> ON <tabname>
REFERENCING NEW AS upd OLD AS prev
FOR EACH ROW
BEGIN
cascade_update.update_table
('<tabname>',:prev.<column>,:upd.<column>);
END;
--
-- Note how the table name is passed to the procedure, this must be
done.
Figure 3: Example trigger utilizing the cascade
update procedures.
SEE CODE DEPOT FOR FULL SCRIPTS
 |
For more information on this topic, I recommend Don
Burleson's latest book "Oracle
Tuning: The Definitive Reference".
You can buy it direct from the publisher for 50%-off and get
instant access to the code depot of Oracle tuning scripts: |
http://www.rampant-books.com/book_1002_oracle_tuning_definitive_reference_2nd_ed.htm
 |
Expert Remote DBA
BC is America's oldest and largest Remote DBA Oracle support
provider. Get real Remote DBA experts, call
BC Remote DBA today. |
 |
|
|
|
|