Reputation: 301
Can I create a query using "replace" to remove more than one character\string from a column content ?
For example I have:
UPDATE table1 SET column1 = REPLACE(column1, '\r\n', '');
But what if I want to remove multiple characters or strings like:
<br />
< >
<\r>
Is it possible to run this in single query ?
Upvotes: 1
Views: 3428
Reputation: 204756
cascade it
UPDATE table1
SET column1 = replace(replace(REPLACE(column1, '\r\n', ''), '<br />',''), '<\r>','')
Upvotes: 2