Deleting/archiving data in SQL Server 2005 - SimonS Blog on SQL Server Stuff

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 10 November 2005 19:12 by simonsabin

Comments

No Comments