Home > database > Mysql to replace before the suffix
Mysql to replace before the suffix
Time:10-23
Now have a lot in my code & lt; Img> The label, I want to & lt; Img> Respectively before and after the label plus & lt; P> And & lt;/p> Label, could you tell me how to write a SQL statement?
CodePudding user response:
The update table name set column name=REPLACE (column name, '& lt; Img> ', '& lt; P> ') where column like '% & lt; Img> % '; Or do not add condition The update table name set column name=REPLACE (column name, '& lt; Img> ', '& lt; P> ');