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 -> mutating table error

mutating table error

From: Bram Stieperaere <bse_at_NO_SPAMsodexho-pass.be>
Date: 7 Aug 1998 14:45:51 GMT
Message-ID: <01bdc212$16672420$c93232c1@bse.sodexho-pass.be>


Is it possible to write an update trigger on a table with a select on this table in it?
When I try I get a mutating table error.

e.g. a trigger to prevent a table from having more than 1 entry for a certain value of an attribute

Select count(*)

	into iCount 
	from T 
	where :old.attrib = <somevalue>

;
if icount > 0 then

        raise .... etc..

Why doesn't Oracle allow this? is there a workaround? Received on Fri Aug 07 1998 - 09:45:51 CDT

Original text of this message

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