create or replace trigger biud_employ_copy
before insert or update or delete
on employees_copy
declare
l_action employees_log.action%type;
begin
if inserting then
l_action:='insert';
elsif updating then
l_action:='delete';
elsif deleting then
l_action:='update';
else
raise_application_error(-2001,'you shoule never ever get this error.');
end if;
insert into employees_log(who,action,when)
values(user,l_action,sysdate);
end biud_employ_copy;
before insert or update or delete
on employees_copy
declare
l_action employees_log.action%type;
begin
if inserting then
l_action:='insert';
elsif updating then
l_action:='delete';
elsif deleting then
l_action:='update';
else
raise_application_error(-2001,'you shoule never ever get this error.');
end if;
insert into employees_log(who,action,when)
values(user,l_action,sysdate);
end biud_employ_copy;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货