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!

ORA-04084: cannot change NEW values for this trigger type

994122Nov 19 2014 — edited Nov 19 2014

Hi all,

CREATE OR REPLACE TRIGGER emp1_trg

   AFTER INSERT

   ON emp1

   FOR EACH ROW

BEGIN

   :new.ename := UPPER (:new.ename);

END emp1_trg;

I am getting below error

CREATE OR REPLACE TRIGGER emp1_trg

                          *

ERROR at line 1:

ORA-04084: cannot change NEW values for this trigger type

The ORA-04084 error is caused because the value is already in the table; therefore, it's not new anymore.

http://www.dba-oracle.com/t_ora_04084_cannot_change_new_values_for_trigger_type.htm

SQL> select * from emp1;

       no rows selected

But i don't have any values in the emp1 table right? I know use BEFORE Insert condition

can you please explain me?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 17 2014
Added on Nov 19 2014
14 comments
5,316 views