MySQL Forums
Forum List  »  Newbie

Re: I need a column that automatically adds the new number with the old number. Possible?
Posted by: Peter Brawley
Date: May 25, 2021 07:42AM

> instead of replacing the value in 'points'

Insert doesn't replace.

> it adds these numbers to the total

Apparently the requirement is to add a row for a name that does not exist, otherwise update the total for that name. Have a look at "insert on duplicate key" in the manual, you should be able to map your requirement to that cmd.

Options: ReplyQuote




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.