UPDATE `tableName` SET `fieldName` = replace(`fieldName`, 'fromString', 'toString') WHERE `fieldName` LIKE '%fromString%';
- 注释:
- tableName:表名
- fieldName:字段名
- fromString:要替换的字符串
- toString:替换成的字符串
hold onto your brightness
UPDATE `tableName` SET `fieldName` = replace(`fieldName`, 'fromString', 'toString') WHERE `fieldName` LIKE '%fromString%';
- 注释:
- tableName:表名
- fieldName:字段名
- fromString:要替换的字符串
- toString:替换成的字符串