To update a new value over the old one in a table in MySQL, you can use the UPDATE statement. Here’s the general syntax:

UPDATE table SET field_name = replace(field_name, 'oldvalue', 'newvalue');

While we are migration WordPress we often be in a situation where we need to update the exting urls with new Urls.

Here are some examples of wordpress update Query for common table

UPDATE wp_options SET option_value = replace(option_value, 'oldvalue', 'newvalue');
UPDATE wp_posts SET guid = replace(guid, 'oldvalue', 'newvalue');
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'oldvalue', 'newvalue');