查找systime是否介于两次-oracle sql之间

时间:2013-07-01 12:20:58

标签: sql oracle triggers

更新

基本上,我正在尝试创建一个触发器,限制对表格b / w 9 p.m和9 a.m的任何更改。这是样本。

CREATE OR REPLACE TRIGGER courses_biud
before insert or update or delete 
on courses 
begin
if to_char(sysdate,'hh24') between **{9 p.m and 9.am}** Then 
...
end ;

1 个答案:

答案 0 :(得分:0)

select to_char(sysdate,'hh24') || ' is in the timeframe'  as result
from dual
where to_char(sysdate,'hh24') > 21
or to_char(sysdate,'hh24') < 9