);
--触发器
create or replace trigger modify_emp before insert or update or delete on emp declare
l_action emp_log.action%type; begin
if inserting then l_action :=\\'插入\\';
dbms_output.put_line(\\'插入\\'); elsif updating then l_action :=\\'更新\\';
dbms_output.put_line(\\'更新\\'); elsif deleting then l_action :=\\'删除\\';
dbms_output.put_line(\\'删除\\'); end if;
insert into emp_log(who,when,action) values (User,sysdate,l_action); end; --测试 update emp set sal=sal+500 --行级触发器
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库Oracle习题(4)在线全文阅读。
相关推荐: