我想用前触发器在另一个表中记录一个表。
CREATE or REPLACE TRIGGER mytrigger BEFORE INSERT OR UPDATE ON mytable FOR EACH ROW
DECLARE
log_row mytable%rowtype;
BEGIN
IF INSERTING OR UPDATING THEN
log_row := :new; --Get all from :new.
log_row.foo = 1; --I would like to modify one or more values!
INSERT INTO mytable_log VALUES log_row;
END IF;
END;
它不起作用。我可以以某种方式将所有数据从 :new 传递给 log_row 吗?
谢谢!