论坛首页 综合技术论坛

用触发器实现在归定时间内不能修改数据

浏览 2043 次
该帖已经被评为隐藏帖
作者 正文
   发表时间:2007-02-20  
用触发器实现在归定时间内不能修改数据!如果修改抛出一个异常!(注意:自定义异常号段为.20000到21000.
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;
论坛首页 综合技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics