Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Mutating table error
hi Helmut,
remove the "for each row" clause .. so that u have a st. level trigger instead of row level .. note that there is no mutation in statement level triggers .. also check if this meets ur business req and is reallt what u want your trigger functionality to achieve.
hth
deepAk
-----Original Message-----
From: Helmut Daiminger [mailto:hdaiminger_at_vivonet.com]
Sent: Thursday, October 12, 2000 11:55 AM
To: Oracle List (Telelist); Oracle DBA List (Lazy DBA)
Subject: Mutating table error
Hi!
I got a problem with mutating tables here.
I am updating a row in a table (table_name). There is an after update trigger associated with that table. Within that trigger I try to READ the same table and I get a mutating table error.
CREATE OR REPLACE TRIGGER TBTABS_TRIGGER_UPD_AFTER AFTER UPDATE
ON table_name
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
declare AA Integer;
BEGIN
AA:=40;
select count(*) into AA from table_name;
update WHLineType set Amount=AA;
end;
Any idea what I could do to avoid the mutating table error?
Thanks,
Helmut