set @i=1;
while @i<=651572
begin
delete from [xx] where ImpleadID in
(SELECT top 1000 ImpleadID FROM [xx] where [RecordDate]<='2017-08-30');
set @i=@i+1;
end;
批量删除数据
最新推荐文章于 2023-04-17 11:20:35 发布
set @i=1;
while @i<=651572
begin
delete from [xx] where ImpleadID in
(SELECT top 1000 ImpleadID FROM [xx] where [RecordDate]<='2017-08-30');
set @i=@i+1;
end;