2012-11-01 55 views

回答

2

写简单的触发,通过使用:OLD和:NEW就可以得到表中的新的和旧值的值

create or replace 
trigger tg_name 
    after UPDATE ON table_name 
for each row 
BEGIN 
IF :NEW.column1 = :OLD.column1 THEN 
-- any statement 
END IF;  
-- you can log the old and new value by inserting into log table's too.. 
END; 
0

你可以做在更新后触发,您可以为每个所需字段使用:旧值和新值。