0
create or replace trigger tri_hours
before insert
on dept
begin
if (to_char(sysdate,'day')='sunday') then
raise_application_error(-20001,' Insert Opeartion not allow because today is sunday ');
else
if inserting then
--insert query on table dept
end if;
end if;
end;
/
当我尝试在星期日插入新记录时,触发器不起作用。火触发器只允许在星期一到星期六在PLSQL中完成交易Oracle
问题是什么? – 2014-09-04 18:54:41
在上面的代码中,请忽略raise_application_error(-20001,'INSERT DURING 09 to 18');然后考虑raise_application_error(-20001,'插入操作只允许在周一到周六之间'); – 2014-09-04 18:59:44
我的问题是我在用户在周日插入新记录时触发了一个触发器。 – 2014-09-04 19:00:31