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
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.