MySQL Syntax Problem


I need to replace all instances of in my database with

I tried this:

SELECT REPLACE('', ''); and no luck.

Any ideas?
Computer GuyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You have to specify 3 parameters:

SELECT REPLACE('******', '', '');

The original text is table column obviously:
 SELECT REPLACE(SomeTextColumn, '', '') AS OutputName
   FROM SomeTable

The function syntax is:
REPLACE(str, from_str, to_str)

More info:

MySQL also provides REPLACE command:
Randy PooleCommented:
I think you would want to replace so issue an update
Update YourTable Set yourcolumn=REPLACE(yourcolumn,'','')

Open in new window

Computer GuyAuthor Commented:
Trying this: SELECT REPLACE('', 'domain1', 'domain2');

How can I do that for all of the tables in the DB on one clip?
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Randy PooleCommented:
This would be a per column per table
Computer GuyAuthor Commented:
So there isn't a way to do it all at once?
Randy PooleCommented:
I suppose you could write a procedure to do it that queries all the tables, then loops through those, and  that routine queries all the string fields which builds and executes a sql statement.  But that would probably take a bit of time.  How many tables/fields does this need to be done to?
Computer GuyAuthor Commented:
This is for moving Wordpress from domain1 to domain2
Topic removed: Misc Databases
Topic added: Wordpress
Randy PooleCommented:
Paul, may want to add topic MySQL
Randy PooleCommented:
Have you looked at this?  This will give you step by step instructions on how to do it, since WP already has scripts for this type of maintenance.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.