sql 循环删除

declare @i int
set @i=8
while(@i<12)
begin
delete from Test where id=@i
set @i=@i+1
end

你可能感兴趣的:(sql)