Change table_name
and field
to match your table name and field in question:
UPDATE table_name SET field = REPLACE(field, 'foo', 'bar') WHERE INSTR(field, 'foo') > 0;
More Related Contents:
- Can MySQL replace multiple characters?
- Search all columns of a table using a single where condition with single keyword in mysql
- Replace Into Query Syntax
- What are practical differences between `REPLACE` and `INSERT … ON DUPLICATE KEY UPDATE` in MySQL?
- MySQL for replace with wildcard
- SQL select only rows with max value on a column [duplicate]
- SELECTING with multiple WHERE conditions on same column
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- How to find gaps in sequential numbering in mysql?
- MySQL: Invalid use of group function
- Combining UNION and LIMIT operations in MySQL query
- MySQL find_in_set with multiple search string
- MySQL JOIN the most recent row only?
- OUTPUT Clause in MySQL
- What does SQL clause “GROUP BY 1” mean?
- Sorting by date & time in descending order?
- Case statement in MySQL
- MySQL: Inner join vs Where [duplicate]
- Syntax error when using except in a query
- Selecting from two tables with inner join and limit [duplicate]
- Why the order of evaluation for expressions involving user variables is undefined?
- sql like operator on integer
- How to select data where a field has a min value in MySQL?
- MySQL – SELECT * INTO OUTFILE LOCAL ?
- How to SELECT by MAX(date)?
- The best way to remove value from SET field?
- get a recursive parent list
- INSERT INTO Table from multiple tables
- Execute INSERT if table is empty?
- Mysql How do you create a clustered index?