Trigger based on sysdate

前端 未结 2 1550
旧时难觅i
旧时难觅i 2021-01-24 09:50

I have a table

Table Schema:

CREATE TABLE CHARGES 
(
    total NUMBER(30),
    admitdate TIMESTAMP(6),
    dischargedate TIMESTAMP(30)
)
<
相关标签:
2条回答
  • 2021-01-24 10:01

    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.

    0 讨论(0)
  • 2021-01-24 10:14

    It would be easier to maintain and reason about if you can change approach and store only static values.And do calculations using sysdate only when needed, like in sql output when asked for it.

    0 讨论(0)
提交回复
热议问题