MySQL: Find and Replace

i accidentally imported a load of customers email addresses with quotes and commas in, so to remedy this, a short query:

UPDATE customers SET email = REPLACE(REPLACE(email, '"', ''), ',' ,'')

the first REPLACE replaces double quotes with nothing, and the second REPLACE replaces commas with nothing.

Leave a Reply

Your email address will not be published. Required fields are marked *