0


I just want to know can I use the OLD keyword to retrieve the older value after updated. I am using this in After update trigger and I am not able to get the old value but new is working. Database being used is MYSQL. I have read in forums and some people are saying old will work and some are opposing that. Please clarify.

Thanks,
Karthik

1 Answer 1

2

If you want to get the previous value, you should use a before trigger instead of an after trigger.

The trigger time is at what stage during the process takes place. This can be either BEFORE or AFTER. If using before this means that the trigger code will be able to work with both the values currently stored in there original state and the new values

MySQL Triggers : Trigger time

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.