oracle触发器实现在归定的时间内不能添加数据

来源:互联网 发布:传智大数据百度网盘 编辑:程序博客网 时间:2024/06/05 23:27
create or replace trigger trg_IU
  before insert or update or delete on table_bill 
  for each row
declare
  v_str varchar2(10);
begin
if inserting then
v_str:='insert';
else
v_str:='update';
end if;
insert into lyx(t_name) values(v_str);
  if(to_char(sysdate,'hh24:mi') between '08:00' and '18:00') then
  raise_application_error(-20510,'hello a! ');
  end if;
end trg_IU; 
原创粉丝点击