jim
jim

Reputation:

How can I replace & with an ampersand in my database?

I have about 6k rows of data where we have & in various different rows. I'd like to replace this with an ampersand sign if possible. Can someone please tell me how to do this with mysql? Thanks

Upvotes: 2

Views: 5167

Answers (1)

gahooa
gahooa

Reputation: 137332

The MySQL REPLACE function should work nicely:

UPDATE tablename SET fieldname = REPLACE(fieldname, "&", "&");

Upvotes: 9

Related Questions