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.




No Comments


You can leave the first : )



Leave a Reply

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