Search and replace in MySQL

For my future reference, searching and replacing some text in MySQL, via SQL.
Info from an article at The Media Tank.

UPDATE mt_entry
SET entry_text = REPLACE (entry_text, 'classlink', 'class')
WHERE entry_text LIKE '%classlink%'
AND entry_id="252";

Dunno why MySQL online manual gives a very basic example which is actually quite non-intuitive for figuring out solutions for “real-life” situations.

2 Responses to “Search and replace in MySQL”

  1. Dan says:

    test (to rebuild my blog)

  2. manuel says:

    yeah thanks for your pointer, the manual’s sample uses a select and is quite unuseful.. btw who’d want to replace “www” with “WwWwWw”???