日期:2014-05-17 浏览次数:20684 次
SET ROWCOUNT 100 WHILE 1=1 BEGIN DELETE FROM Student WHERE lass ='0903' AND Sex ='M' IF @@ROWCOUNT<100 BREAK END WHILE 1=1 BEGIN DELETE TOP (100) FROM Student WHERE lass ='0903' AND Sex ='M' IF @@ROWCOUNT<100 BREAK END
------解决方案--------------------
--2000 or 2005 set rowcount 5000 DELETE STUDENT WHERE Class ='0903' AND Sex ='M' WHILE @@ROWCOUNT>0 BEGIN DELETE STUDENT WHERE Class ='0903' AND Sex ='M' END set rowcount 0