replace(object,search,replace)
将sysshop_store表中area_code字段出现的1,全部替换为空
UPDATE sysshop_store SET area_code=replace(area_code,'1,','') WHERE `area_code` REGEXP '^1,' ;
REGEXP 匹配正则表达式,这里的where条件是area_code字段中 1, 开头的数据
replace(object,search,replace)
将sysshop_store表中area_code字段出现的1,全部替换为空
UPDATE sysshop_store SET area_code=replace(area_code,'1,','') WHERE `area_code` REGEXP '^1,' ;
REGEXP 匹配正则表达式,这里的where条件是area_code字段中 1, 开头的数据