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
update tb set content=replace(content,'cd','0')
update 表 set content=replace(content,'cd','0') where charindex('cd',content)>0
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
update 表 set content=replace(content,'cd','0')
where charindex('cd',content)>0
text类型比较麻烦,不如用varchar(max)