What Mysql query will do a text search and replace in one particular field in a table?
ie search for 'foo' and replace with 'bar' so a record with a field with the value : 'hello foo' becomes: 'hello bar'.
What Mysql query will do a text search and replace in one particular field in a table?
ie search for 'foo' and replace with 'bar' so a record with a field with the value : 'hello foo' becomes: 'hello bar'.
UPDATE table_name SET field = replace(field,'[string-to-find]','[string-that-will-replace-it]');
update table set field = replace(field, 'foo', 'bar') where instr(field, 'foo') > 0;