SUBSTRING_INDEX
CONCAT
例子:更新表table_name中的column_name字段,该字段特点是“*****,*****”的格式,进行逗号分割并对两部分分别结尾拼字符串
update table_name set column_name = concat(SUBSTRING_INDEX(column_name,",",1),"addStr,",SUBSTRING_INDEX(column_name,",",-1)) where column_name like '%,%'
网友评论