MySQL Forums
Forum List  »  Newbie

How to calculate value with UPDATE current record
Posted by: Roger Desmedt
Date: May 20, 2021 06:07AM

Hi,

I have a table with 4 fields; id (key), start, stop, total
It gets the data from another table by trigger (start, stop and total).

How can I re-calculate the field "total" when I change start or stop by hand (UPDATE)?
I don't want to use FOR EACH ROW since it will re-calculate the whole table.

Is there a way to retrieve the id of the particular record so I can use it with WHERE or is there another way?

KR,
Roger

Options: ReplyQuote


Subject
Written By
Posted
How to calculate value with UPDATE current record
May 20, 2021 06:07AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.