Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 297
  • Last Modified:

find and replace mysql

In this case, I have several tables which have a clientid of 30.
I need to find every single instance and switch those over to clientid 150.

I am using phpmyadmin in this case but can also do this from the command line if needed.

mysql-server-5.5.40
0
projects
Asked:
projects
  • 2
1 Solution
 
Steve BinkCommented:
Quick and dirty..  For each of the tables you need to change:
UPDATE <tablename> SET clientid=150 WHERE clientid=30

Open in new window

0
 
projectsAuthor Commented:
Thank you. I'm amazed that I wasn't able to find something this simple when searching the net.
0
 
Steve BinkCommented:
You can find more information in the MySQL docs.  Good luck!
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now