Oracle8 vs Oracl8i (trigger) [message #369849] |
Mon, 23 October 2000 05:50 |
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.
|
|
|
|