trigger

CREATE OR REPLACE TRIGGER demo_trigger
AFTER UPDATE ON debug_demo1
REFERENCING OLD AS "USER_BEFORE_UPDATED" NEW AS "USER_AFTER_UPDATED"
FOR EACH ROW
DECLARE  
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
    INSERT INTO debug_demo1
        VALUES
        ('ab',:USER_BEFORE_UPDATED.note, :USER_AFTER_UPDATED.id);
        commit;
END;

posted @ 2014-05-11 22:24  942391815  阅读(131)  评论(0编辑  收藏  举报