Yep, this one is handy…
WHILE EXISTS(SELECT indexedfield FROM tableToLookAt) BEGIN DELETE FROM tableToLookAt WHERE indexedfield in ( SELECT TOP 20000 indexedfield FROM tableToLookAt ) WAITFOR DELAY '00:00.01' END
Yep, this one is handy…
WHILE EXISTS(SELECT indexedfield FROM tableToLookAt) BEGIN DELETE FROM tableToLookAt WHERE indexedfield in ( SELECT TOP 20000 indexedfield FROM tableToLookAt ) WAITFOR DELAY '00:00.01' END