Home Forums SQL Server 7,2000 T-SQL Divide big delete into several small ones RE: Divide big delete into several small ones

  • One point to add to this is that you MUST set your rowcount to 0 after the loop! Not doing so will limit all your following queries to the same 1000 records and may really cuase problems. 🙂

    Also this can be a way of keeping your log file from growing too large as you can truncate the log inside the loop if needed as well.

    Gary Johnson

    Microsoft Natural Language Group

    DBA, Sr. DB Engineer




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.