Skip to content

Instantly share code, notes, and snippets.

@imliam
Created November 23, 2017 16:11
Show Gist options
  • Save imliam/3d450ddf74dde4b3ea61a1a1a8f43dce to your computer and use it in GitHub Desktop.
Save imliam/3d450ddf74dde4b3ea61a1a1a8f43dce to your computer and use it in GitHub Desktop.
/**
* MySQL Replace Text
*
* Replace a certain bit of text inside a MySQL entry. For example, replacing
* every instance of one word with another.
*/
UPDATE table_name
SET column_name = REPLACE(column_name, 'good', 'amazing')
WHERE column_name LIKE 'Jannet%'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment