Reputation: 101
I want to create an Update trigger which updates the values of column say status1 in database after column say status2 has been updated of the same table ?
But this(the updating) should happen after a delay of 3 minutes.
Please provide sample code
Upvotes: 1
Views: 1187
Reputation: 15092
Here's what I would do:
Create a PL/SQL procedure that scans your table for orders that have been placed but not paid for after 3 minutes. I assume you have timestamps or something in the table so you can tell when the order was placed.
Create a DBMS_SCHEDULER job that calls your procedure. Have the job run every 3 (or 2, or 1) minutes.
Now, all you have to do is insert into your table normally.
Upvotes: 1