Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Avoiding "ORA-04091 table string.string is mutating"
Hi, maybe this is a faq but I didn't find any solution...
I have a table like this one, which describes some time intervals in the form [startdate,enddate].
create table mytab
(
startdate date not null, enddate date not null
I don't want this table to contain overlapping intervals: it must be impossible to insert a record that overlaps with an already existing one or to update an existing record in order to make it overlap over onto another one.
I had no problems in writing a before insert trigger that performs the required test, but I don't know how this check could be performed in a before update trigger.
p.s: this table contains about one hundred thousands of records: I can't keep it all in package variable...
Any Ideas?
Thanks in advance,
Carlo Sirna Received on Mon Nov 03 2003 - 09:18:26 CST