Skip to content

Find and replace text in table using MySQL query

There are times when you have huge data in table , and you my want to replace some text with something or you may be spelled something wrong now you may want to correct it. It will take lot of time to do it manually.So we gonna use replace() function of MySQL to achieve this task.

In this post i will show you how you can use MySQL query for replace text in the table.

You need to go to your phpMyAdmin and select your database. Then click the SQL button. Once you have done that paste the following code:

  UPDATE `table_name` SET `field_name` = replace(same_field_name, 'old_text', 'new_text')

in the above query replace dummy data with your data.

That’s it.

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments