PL/SQL (MOSC)

MOSC Banner

after insert update trigger

edited Dec 2, 2009 1:39AM in PL/SQL (MOSC) 28 commentsAnswered ✓
   I have a table named item_master and I have another table named item_master_copy. I need to capture the changes to the item_master table and then copy the change to the item_master_copy table.

I created an after insert & update trigger on item_master table as follows:

create or replace trigger after_insert_update_item
after insert or update on item_master
for each row
declare
v_reflag char(1);
begin
v_reflag:='0';
if (:new.t$item != :old.t$item) then
insert into item_master_copy
(t$item,
t$dsca,
t$wght,
t$buyr,
reflag)

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center