sever sql 增量删除记录

WHILE 1 = 1
BEGIN 
   DELETE TOP(500) FROM pgenius.dbo.CUST_NEWS_CONTENT with(nolock)
   WHERE mtime<='2020-01-01'
   IF @@rowcount < 500 
    BREAK;
END

原文地址:https://www.cnblogs.com/gina11/p/13952086.html