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