How to change strings in MySQL tables

How to change strings in MySQL tables? e.g. I want to change to

asked Jul 31, 2013 by EricaS. (210 points)

1 Answer

Use the REPLACE functions of MySQL:

One example is like this:

UPDATE table
SET field = REPLACE(field, '', '')
WHERE field LIKE ''

The WHERE clause is not needed but can make execution faster.

answered Jul 31, 2013 by anonymous
edited Jul 31, 2013

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost