PL/SQL (MOSC)

MOSC Banner

Trigger after updating record

edited Mar 22, 2016 1:41AM in PL/SQL (MOSC) 1 commentAnswered ✓

Hi

I am using oracle 11g. I am trying to execute a procedure inside a trigger that fires after updating a record. My trigger is as follows:

CREATE or REPLACE TRIGGER test_trigger

AFTER UPDATE OF f2 ON test

FOR EACH ROW

when (new.f2 = '00' and new.f1 = '2016' )

DECLARE

BEGIN

my_test_proc(:new.f3);

END;

and my procedure is as follows:

CREATE OR REPLACE PROCEDURE my_test_proc(

  v_col_f1 in varchar2) IS

BEGIN

  insert into test2 (f1)

  Values(v_col_f1) ;

 

  commit;

END;

/

Both the trigger and procedure compiles without error but when I am going to update f2 field of test table it gives following error

Tagged:

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