Skip to content

Instantly share code, notes, and snippets.

@bbrothers
Created March 13, 2013 20:23
Show Gist options
  • Save bbrothers/5155805 to your computer and use it in GitHub Desktop.
Save bbrothers/5155805 to your computer and use it in GitHub Desktop.
mysql string replace
UPDATE my_table
SET my_field = REPLACE(my_field, 'old-string', 'new-string')
WHERE my_field LIKE '%old-string%'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment