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!

trigger: error says:maximum number of recursive SQL levels

875608Apr 15 2012 — edited Apr 17 2012
Hi All,

the trigger error says: maximum number of recursive SQL levels (50) exceeded.

But i would expect it to say that mutating table error.

As the trigger is trying to insert into the same table on which the trigger is based (referring the same table and it is a row level trigger).

Are the two errors the same.

Code:

CREATE OR REPLACE TRIGGER employee_ins_t1
BEFORE INSERT ON employee FOR EACH ROW
BEGIN INSERT INTO employee (employee_id) VALUES (employee_seq.nextval);
END;

Just wanted to know the diff.
I understand recursion, but in this case it is simply a violation of trigger rule...it is mutating.

Any idea why i am given the other error.
meenakshi
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 15 2012
Added on Apr 15 2012
4 comments
774 views