php - MySQL: How to pre-append text to data in an existing column? -


this question has answer here:

i have populated mysql table need pre-append text "new_" name field. (long story, needs done now.)

i imagine can done update i'm not sure how add "new_" start of 'name' column. work in php, need in php read each record, extract 'name' field, add , update record? or can done in mysql?

use query

update table_name set `name` = concat('new_',`name`) 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -