--每次删多少 DECLARE @BatchSize INT = 100 WHILE 1 = 1 BEGIN DELETE TOP (@BatchSize) FROM tb WHERE id>30 IF @@ROWCOUNT < @BatchSize BREAK END