Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in SQL by (6.1k points)

Normally, I manually find to replace text in a MySQL database using PHPMyAdmin. I am very much exhausted of it now, So how can I execute a query to find and replace a text with the new text in the whole table in PHPMyAdmin?

Example: Find the keyword domain.com, and replace it with www.domain.com.

1 Answer

0 votes
by (12.7k points)

For a single table update:

 UPDATE `table_name`
 SET `field_name` = replace(same_field_name, 'unwanted_text', 'wanted_text')

For Multiple tables-

If you need to edit from all the tables, the simple way is to take the dump and then find/replace and upload it back.

Willing to Learn SQL? Join the SQL Certification course by Intellipaat.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Dec 19, 2020 in SQL by Appu (6.1k points)

Browse Categories

...