Reputation: 981
Lets say I have multiple commands like 5000 which updates some column and row in databse - it is number for example
UPDATE salary SET money=2000000 WHERE person=55;
Is there any way how to update such data without destroying the original value? Lets say the money has already exiting and different value? I have searched google and MySQL manual but I did not find any useful query for this. Is there any way how to update such data without destroying the original value? Thank you.
Upvotes: 0
Views: 250
Reputation: 2215
Your guess was almost perfect.
UPDATE salary SET money=money+2000000 WHERE person=55;
Upvotes: 2