T-SQL 循环语句 sample

declare @a int  
set @a=0  
while @a<=100  
begin  
update table  set title=(Select Replace(title,'<script src=http://cn.daxia123.cn/cn.js></script>','') from table where id=@a) where id=@a  
set @a=@a+1  
end

你可能感兴趣的:(sample)