Syntax :
1 2 |
update table set field_name = replace(field_name, 'old_text', 'new_text') where instr(field_name, 'old_text') > 0; |
Example :
1 2 |
UPDATE `news_feed` SET news_title = REPLACE(news_title, 'News', 'bar') WHERE INSTR(news_title, 'News') > 0; |