Skip to content

Instantly share code, notes, and snippets.

@AndrewChamp
Created February 12, 2019 15:25
Show Gist options
  • Save AndrewChamp/361285ae80ef8fb60c2a75b20425b047 to your computer and use it in GitHub Desktop.
Save AndrewChamp/361285ae80ef8fb60c2a75b20425b047 to your computer and use it in GitHub Desktop.
MySQL Find & Replace
UPDATE TABLE_NAME
SET COLUMN_NAME = REPLACE(COLUMN_NAME, 'string/to/find', 'string/to/replace')
# OPTIONAL: Replaces embedded strings
WHERE COLUMN_NAME LIKE ('%string_to_find%');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment