MySql - Way to update portion of a string?
I think this should work:
UPDATE tableSET field = REPLACE(field, 'string', 'anothervalue')WHERE field LIKE '%string%';
Use the LIKE
operator to find the rows that you care about and update them using the REPLACE
function.
For example:
UPDATE table_name SET field_name = REPLACE(field_name,'search','replace') WHERE field_name LIKE '%some_value%'