update tab
set content=replace(content,'cd','0')
where charindex('cd',content)>0

解决方案 »

  1.   

    update 表 set content=replace(content,'cd','0')
      

  2.   


    create table os(a text)
    insert into os select 'abcdef'DECLARE @a binary(16)
    SELECT @a = TEXTPTR(a) from os
    UPDATETEXT os.a @a 2 2 '0' 
    GOselect * from os
      

  3.   

    update tb set content=replace(content,'cd','0')
      

  4.   


    update 表 set content=replace(content,'cd','0')
    where charindex('cd',content)>0
      

  5.   

    函数 replace 的参数 1 的数据类型 ntext 无效。
      

  6.   

    看了一哈。。关于ntext的处理是比较麻烦的事情。。谢谢各位了。
      

  7.   


    text类型比较麻烦,不如用varchar(max)