方法一
SET ROWCOUNT 500delete_more: DELETE FROM LogMessages WHERE LogDate < '2/1/2002'IF @@ROWCOUNT > 0 GOTO delete_moreSET ROWCOUNT 0
方法二
while 1=1
begin
delete top 500 from table
end
if @@ROWCOUNT <500 break;
posted on 2017-02-04 11:57 石下江的太阳光 阅读(184) 评论(0) 编辑 收藏 举报