Home > Blogs, Bookmarks, MySQL, Tech, Wordpress > Search and Replace in MySQL Database

Search and Replace in MySQL Database

November 28th, 2007 Leave a comment Go to comments

use MySQL REPLACE function!

1. BACKUP YOUR DATABASE FIRST.

2. From within phpMyAdmin, open your database.

3. And here is the SQL query to replace string in database table:

UPDATE table_name SET column_name = REPLACE(column_name,"original_string","replace_string")

  1. No comments yet.
  1. No trackbacks yet.
GoCache - ByREV-Cache v1.0 - live served in : 0.140686 sec (gzip)