0

I am looking for your assistant in understanding the way and the code to get the column value to be changed after 4 days.

Currently, whenever I am inserting a new row in the database, the value of the flag will be "Y" by default and I will capture the created date & time by storing the sysdate by default. Now, I want the flag to be changed to "N" after 4 days from the creation.

So, please guide and instruct me on the way to do the above.

user3407440
  • 183
  • 1
  • 2
  • 15

1 Answers1

1

You should look into creating a Trigger on INSERT/UPDATE/DELETE IF your table is frequently accessed for those operations.

If not, then you would have to schedule a job to run SQL daily or how frequent you'd like to check.

how to schedule a job for sql query to run daily?

Community
  • 1
  • 1
Ramie
  • 1,171
  • 2
  • 16
  • 35