Oracle触发器

前端之家收集整理的这篇文章主要介绍了Oracle触发器前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1.DML触发器

//例子
create or replace trigger dml_log
before delete or insert or update on department
for each row
begin
 if inserting then ...
  elsif deleting then...
  else ...
 end if
end

//限定条件的行集触发器
create or replace trigger dml_log
before update of salary on department
for each row
when(new.job='管理员' AND (ABS(NEW.salary-old.salary)>200)))
declare
 v_no number;
begin
 select count(*) into v_no from logs2;
end
原文链接:https://www.f2er.com/oracle/208345.html

猜你在找的Oracle相关文章