I have a table in SQL Server 2005 which has approx 4 billion rows in it. I need to delete approximately 2 billion of these rows. If I try and do it in a single transaction, th
What distinguishes the rows you want to delete from those you want to keep? Will this work for you:
while exists (select 1 from your_table where ) delete top(10000) from your_table where