我有一个表TABLE_NAME,有3个字段C1,C2,C3,在表上建立触发器:
create or replace trigger TRG_TABLE_NAME before INSERT or DELETE or UPDATE on TABLE_NAME for each row
但是我希望当更改表中纪录时,如果更改的字段是C3就不执行触发器了,能够实现,如何实现?
------解决方案--------------------
SORRY:
IF UPDATING THEN
IF :OLD.C3 < >:NEW.C3 AND :OLD.C1=:NEW.C1 AND :OLD.C2=:NEW.C2 THEN
RETURN;
END IF;
END;
------解决方案--------------------
那你可以挑出要更新的字段来
create or replace trigger TRG_TABLE_NAME before INSERT or DELETE or UPDATE of f1,f2,f3... on TABLE_NAME for each row