create or replace trigger seemp
before insert
on emp
begin
if to_char(sysdate,'day')in ('星期六','星期日')or
to_number(to_char(sysdate,'hh24'))not between 9 and 18 then
raise_application_error(-20001,'禁止插入');
end if;
end;
/
insert into emp(empno,ename,job,sal)values(36,'ddd','88uu',343);
利用触发器实现数据库的审计
网友评论