DELETE FROM myTable WHERE columnA = 'B'
--This will ensure that the value of @@ROWCOUNT for the loop will be > 0select 1while @@ROWCOUNT > 0begin with DeleteList as (select top 1000 columnA from MyTable order by [Clustered Index]) --order by clustered index so the engine should not have to revisit any given page more than neccesary. delete DeleteListend