http://sqlcat.com/msdnmirror/archive/2009/05/20/fast-ordered-delete.aspx
Great use of the "Can only use TOP in VIEW with ORDER BY" limit
CREATE VIEW v1 AS (SELECT TOP (10000) * FROM TABLE ORDER BY DATETIME)
--and we can delete the “top” rows using simply
DELETE FROM v1
No comments:
Post a Comment