Lets say that I have data rows that look like this:
----------------------------
test_table
---- -------- --------------
id word updated_word
---- -------- --------------
1 g00gle ggle
2 bread0 bread
3 0bject bject
4 d0d0 dd
------------- --------------
What statement could I use to take out the zeroes in the word column, so that it looks like the updated_word column? I thought of using substring, but didn't know how to proceed after that.
CodePudding user response:
try:
UPDATE test_table
SET word = REPLACE(word, '0', '');
replace the 2nd blank '' with anything you want to change with.