UPDATE text
    SET content=REPLACE(content,'A公司','B公司')

解决方案 »

  1.   

    update [text] set content = replace(content , 'A公司' , 'B公司')
      

  2.   

    谢谢楼上二位,但我运行后,出现如下错误: Msg 8116, Level 16, State 1, Line 2 
    Argument data type contentis invalid for argument 1 of replace function. 
    忘了交待一点,我的 content 字段是 ntext的,有关系吗,怎么办呢?
      

  3.   


    update [text] set content = replace(cast(content as varchar(8000)), 'A公司' , 'B公司')