Search and replace part of string in database

前端 未结 6 1977
余生分开走
余生分开走 2020-12-04 21:11

I need to replace all iframe tags, stored as nvarchar in my database. I can find the entries using the following sql-question:

SELECT * FROM databasename..Ve         


        
6条回答
  •  南方客
    南方客 (楼主)
    2020-12-04 22:06

    You can do it with an UPDATE statement setting the value with a REPLACE

    UPDATE
        Table
    SET
        Column = Replace(Column, 'find value', 'replacement value')
    WHERE
        xxx
    

    You will want to be extremely careful when doing this! I highly recommend doing a backup first.

提交回复
热议问题