declare re_cur scroll cursor for select title from article
open re_cur
fetch next from re_cur
while @@fetch_status = 0
begin fetch next from re_cur
declare @aa varchar(8000)
select @aa = title from article
update article set title = left(@aa,len(@aa)-134) --134为垃圾代码长度
end
close re_cur
deallocate re_cur
GO
create table tb (id int identity(1,1),title varchar(2000))
insert into tb (title) select '123aaaaaa' union all select '456aaaaaa' union all select '6aaaaaa'
declare @id int
declare re_cur cursor for select [id] from article
open re_cur
fetch next from re_cur into @id
while @@fetch_status = 0
begin
declare @aa varchar(8000)
select @aa = title from article where id = @id
update article set title = left(@aa,len(@aa)-134) where id = @id
fetch next from re_cur into @id