user3664498 user3664498 - 1 year ago 53
MySQL Question

How i can update the value for any key by adding on the current value

I have a table X where there are values for approver_grp as 210061280,200019820 for one row , 213044040 for another and so on ..
I wish to add 212031856 and 21202589 to the existing values.
Can you please suggest what sql statement can be used to update these values.

Thanks in advance

Answer Source

use CONCAT() and if you want update specific row only means use where condition otherwise leave it .

update table_name set column_name=concat(column_name,',','212031856,21202589') where id= specific_row_id 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download