Triggers for date verification

Asked

Viewed 23 times

0

I’m having a question!

I have a schedule of contracts and wanted to update the field of data_exclusao for the current date each time the field data_inicio is possible through triggers? I’m a beginner in triggers and I know the basics...

1 answer

2


You can use Event Scheduler

Scheduled tasks of this type are also sometimes known as " time triggers "

A small example can be found in documentation theirs:

CREATE EVENT [IF NOT EXIST]  event_name
ON SCHEDULE schedule
DO
event_body
  • This will work similar to a "crontab" only for BD, correct?

  • Yes, but the language is different ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 MINUTE

Browser other questions tagged

You are not signed in. Login or sign up in order to post.