--使用updating判断create or replace trigger test_trig before update on 表1begin if updating('字段1') then
T-SQL; end if; if updating('字段2') then T-SQL; end if;end;
本文介绍了一种在Oracle中使用触发器判断更新字段的方法。通过创建一个名为test_trig的触发器,在表1上进行更新操作之前,检查是否更新了字段1或字段2,并根据条件执行相应的T-SQL语句。
--使用updating判断create or replace trigger test_trig before update on 表1begin if updating('字段1') then
T-SQL; end if; if updating('字段2') then T-SQL; end if;end;
被折叠的 条评论
为什么被折叠?