开发者

how to replace text in a particular column on a table in sqlserver

I have an table Employee, with a Description column. In the description column I have the text <br />. Now I need to replace this text with the text <br&开发者_StackOverflow社区gt;.

Is there any way that i could modify the value in the column itself?


Update Employee
Set Description = Replace(Description , '<br />','<br>')
Where IDColumn = RecordIdValue

You can omit the where clause if you want to update ALL rows in the table.


Use the REPLACE function with a UPDATE statement:

UPDATE EMployee
SET Description = REPLACE(Description, 'find this text', 'replacement')
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜