基于sysdate的触发器

编程入门 行业动态 更新时间:2024-10-10 23:25:35
本文介绍了基于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的触发器

本文发布于:2023-10-16 14:17:44,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1497815.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:触发器   sysdate

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!