I am trying to update the changed date of a table. For instance, I have a table with 4 columns: column1, column2, column3, changed_dt.
If any of the first 3 columns get update, I want the changed date to update.
However, I am getting the mutuating error. Why?
If any of the first 3 columns get update, I want the changed date to update.
Code:
CREATE TRIGGER MyTestTrigger
AFTER UPDATE of "column1", "column2", "column3"
ON Mytable REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
begin
IF UPDATING THEN
UPDATE Mytable
SET CHANGED_DT = SYSDATE;
END IF;
END;
/
However, I am getting the mutuating error. Why?
Comment