Showing posts with label update. Show all posts
Showing posts with label update. Show all posts

MySQL: Updating Table using UPDATE REPLACE Query

Tags: April 29, 2012 9:31 AM
0 comments

This query is quite helpful when you moving from development machine to production where your table content is full of dozen 'http://localhost/' links.

Syntax

UPDATE [table] SET [column] = REPLACE(
  [column],
  [old_value],
  [new_value]
) WHERE [column] LIKE [old_value];

Share on Facebook Twitter