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
Post a Comment