Re: ORA-4091: Mutating Tables...

From: Stephen Lappin <SL_at_rtel.demon.co.uk>
Date: Thu, 16 Jun 1994 16:05:14 +0000
Message-ID: <771782714snz_at_rtel.demon.co.uk>


In article <1994Jun14.162205.616_at_corning.com> kruger_rc_at_corning.com writes:

> Whenever I try this (creating a trigger that calls a procedure to check
> status in detail for all 'm1' row, the error (ORA-04091 : mutating table)
> says something to the effect that I can't access the same table that I've
> put a trigger on.

Select, update etc statements on the same table are not allowed.

BUT, there is a work around if you only want to select from the table that the trigger belongs to. Create a view (select * from table) and select from the view rather than the table. Note that it only works for selects (not updates etc.)

ORACLE support have said that this workaround is a bug, but they have had so many complaints about mutating tables that they will probably be improving the situation in the future

Slainte mhath,
Stephen Lappin

+-----------------+
| +-------------+ |  Real Time Engineering Ltd.
| |  Real Time  | |  Capital House
| +-------------+ |  20 Park Circus
| Engineering Ltd |  Glasgow G3 6BE         Tel: +44 (0)41 332 9400
+-----------------+  Scotland U.K.          Fax: +44 (0)41 331 2509
Received on Thu Jun 16 1994 - 18:05:14 CEST

Original text of this message