我在表 A 上有 2 个触发器,一个是 BEFORE INSERT ,一个是 AFTER INSERT :
CREATE OR REPLACE TRIGGER DEMO_TRG
AFTER INSERT
ON A
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
declare
PRAGMA AUTONOMOUS_TRANSACTION;
begin
UPDATE A
SET STATUS = 'DONE'
WHERE id_id =:new.p_id;
commit;
END;
/
为什么 after insert 中的 update 命令不起作用(状态未设置为 DONE)?我错过了什么吗?