MySQL REPLACE multiple values -
MySQL REPLACE multiple values -
i have info in column causing problems. there multiple bad characters need remove. i'd in query.
on question: mysql string replace
i see can select replace(string_column, 'search', 'replace') url
works illustration replacing / //
i need replace / // , & && illustration in single query. best way accomplish this?
if replacing multiple character need utilize multiple replace in 1 query below. if there many characters replaced improve utilize application layer handle it. in other words few replacement easy utilize query many character replacement query becomes messy , ends hard read or change.
select replace( replace(string_column,'/','//'),'&','&&' )
mysql
Comments
Post a Comment