Deleting/archiving data in SQL Server 2005

A delete can now use TOP i.e.

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

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 using the above.

This very is similar to my post http://www.sqljunkies.com/WebLog/simons/archive/2005/10/23/17204.aspx.

 

 -
Published Thursday, November 10, 2005 7:12 PM by simonsabin

Comments

No Comments