本文介绍了基于sysdate的触发器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个表格
表格架构:
CREATE TABLE CHARGES ( total NUMBER(30), admitdate TIMESTAMP(6), dischargedate TIMESTAMP(30) )触发器算法:
if { dischargedate="null" then total=admitdate-sysdate=difference in days * Total Do this every day at 12:00(24 Hr. Format) } else { Do Nothing; }我的问题是如果系统在上午12:00离线。这个问题不允许触发器运行。
My question is what to do if the system is offline at 12:00 am. This problem will not allow the trigger to run.
推荐答案要在特定时间运行一段代码, em>作业。触发器只有响应表更改。 如果服务器关闭(几乎不可能),则作业可以稍后运行。
To run a piece of code on a specific time, you can use jobs. Triggers are there only to respond to table changes. If the server is down (which it should hardly ever be), the job can be run at a later time.
更多推荐
基于sysdate的触发器
发布评论