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

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

java - SmsManager sending message more than one -