blog.x-e.ro / mysql string replacements : quick and dirty sql example

mysql string replacements

sql :: quick and dirty sql example

sometimes you find the need to do mass string replacements in your mysql/maria databases. here's how i do it:

UPDATE your_table
SET your_field = REPLACE(your_field, 'old_value', 'new_value')
WHERE your_field LIKE '%old_value%'
loading...

loading...