Home » RDBMS Server » Server Administration » Oracle8 vs Oracl8i (trigger)
Oracle8 vs Oracl8i (trigger) [message #369849] Mon, 23 October 2000 05:50 Go to next message
Lina
Messages: 12
Registered: October 2000
Junior Member
Hi,
I create a following trigger in Oracle8, error message display about the constraining/ mutating table, but when create in Oracle8i the EMP table updated correctly.

CREATE OR REPLACE TRIGGER cascade_updates
AFTER UPDATE OF deptno on DEPT
FOR EACH ROW
BEGIN
UPDATE emp
SET emp.deptno = :new.deptno
WHERE emp.detpno = :old.deptno;
END;
/

I issue the following statement

UPDATE dept
SET deptno = 1
WHERE deptno = 30;

-----------------------------------------
In both Oracle8, Oracle8i, I have same table
structure and same trigger.
In Oracle8, I get message (table DEPT is
mutating, trigger/function may not see it ......)
In Oracle8i, all the deptno in EMP updated to 1.

Can anybody confirm with me why ? Thanks.
Re: Oracle8 vs Oracl8i (trigger) [message #369851 is a reply to message #369849] Tue, 24 October 2000 02:21 Go to previous message
AndreaB
Messages: 5
Registered: October 2000
Junior Member
In Oracle8 the error message is generated when validating the foreign key constraint. In Oracle8i validation of foreign key constraint do not raise the 'table mutating' error.
Previous Topic: creating a database
Next Topic: Oracle SQL
Goto Forum:
  


Current Time: Sun Dec 22 15:40:29 CST 2024