Trigger (cIA 8)

Write an after statement-level trigger. Whenever an insert, update, or delete operation occurs on the EMP table, a row is added to the employee audit table recording the date, user, and action.

create or replace trigger audit1_trigger

after insert or delete or update on emp


v_action varchar2(18);


if inserting then

v_action:=’added emp’;

elsif updating then

v_action:=’updating emp’;

elsif deleting then

v_action:=’deleting emp’;

end if;

insert into audit1 values(sysdate,user,v_action);



4 replies on “Trigger (cIA 8)”

Undeniably feel that which you said. Your chosen reason seemed
to be on the net the simplest thing to be familiar with.
I believe that for you, I certainly get irked while people consider worries that they can plainly will not find out about.
You were able to hit the nail upon the most notable and defined out everything without the
need of unwanted effect , people can take a signal.
Will likely be back to get more. Thanks

Comments are closed.