Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> trigger cause "mutating" error

trigger cause "mutating" error

From: junfan <fanjun_at_bigfoot.com>
Date: 2000/07/04
Message-ID: <01bfe599$52224d80$a0364f0f@bj210276>#1/1

Hi,

I created 2 tables as follows:

create table station(

station_id	char(6)	primary key,
name	char(20),
phone	char(20)

);

create table cover_area(

station_id	char(6)	primary key,
area_code	char(4)

);

create or replace trigger del_station
after delete on station
for each row
begin
delete from cover_area where station_id = :old.station_id; end;

I then encountered error when I tried to delete rows from "station":

> delete from station;

ERROR at line 1:
ORA-04091: table CCC.COVER_AREA is mutating, trigger/function may not see it
ORA-06512: at "CCC.DEL_STATION", line 2
ORA-04088: error during execution of trigger 'CCC.DROP_COVER_AREA'

I was told the problem is due to "cover_area" is locked. but how can i overcome the error?

Regards Received on Tue Jul 04 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US