How to replace text in a specific column of a table in sqlserver

I have an Employee table with a Description column. In the description column I have text <br />. Now I need to replace this text with text <br>.

Is there any way to change the value in the column itself?

+3
source share
2 answers
Update Employee
Set Description = Replace(Description , '<br />','<br>')
Where IDColumn = RecordIdValue

You can omit the sentence whereif you want to update ALL rows in the table.

+4
source

Use REPLACEwith UPDATE:

UPDATE EMployee
SET Description = REPLACE(Description, 'find this text', 'replacement')
+2
source

Source: https://habr.com/ru/post/1795425/


All Articles