Friday, November 11, 2005

Another way of deleting data in chunks

I'm bloggin this because I'll need it in a few weeks....

Michael Campbell has blogged about removing data from a table in chunks http://sqladvice.com/blogs/repeatableread/archive/2005/09/20/12795.aspx. This can be simplified even further in SQL Server 2005


DELETE TOP (2000) FROM MyBigTableWHERE someCondition = true  ORDER BY Dateolumn ASC


 

  [ via WebLogs @ SqlJunkies.com]

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.