Created
August 22, 2012 05:28
-
-
Save matthewsimo/3422501 to your computer and use it in GitHub Desktop.
SQL Query to find 'search-term-find' & replace with 'search-term-replace' in a colX in tableX if colY matches colYvalue in same row.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| UPDATE tableX | |
| SET tableX.`colX` = REPLACE(colX,'search-term-find','search-term-replace') | |
| WHERE tableX.`colY` = 'colYvalue'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment