We help IT Professionals succeed at work.

Find and Replace mysql Query

Fernanditos asked

I would like to replace all "free" terms in my title_bok table colum by "xyz"

table name: books_bok
column name: title_bok  

For example this book title:

"Harry Potter Free Preview" should be changed to ""Harry Potter xyz Preview"

Can some expert please help me out wit this mysql query ?

Thank you.
Watch Question

update books_bok set title_bok = replace(title_bok,'Free','xyz')
UPDATE books_bok SET title_bok = REPLACE(title_bok, 'Free', 'xyz');

always keep a backup of your db, if you are using phpmyadmin, you can execute this query

Note, this is a case sensitive, so you have to run for FREE, Free...