MySql Replace or Rename String

To replace a string in MySql in multiple rows, you can use REPLACE method of MySql where you can replace or rename the old values with the new desired values.

Here is a simple method of replacing string in MySql query:

MySql Replace Method

Try out the following query for replacing the values using the MySql Update query with Replace method:

UPDATE table_name
SET field_name = REPLACE (field_name, 'old_text', 'new_text');

Hope this helps you in replacing the values using MySql.

  1. bh


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>