title: delete large amount of data
body: <p>i have to delete a large amount of data. truncate is not possible because of relations.
  And I don't wanna drop the table because of views.
  I am using code below but is there better idea?</p>
  
  <pre><code>delete from table
  WHILE 1=1
  BEGIN
  BEGIN TRAN
  DELETE  top (1000000) from table
  IF @@rowcount &lt; 1000000 BREAK
  WAITFOR DELAY '00:00:00:010'
  COMMIT
  end  
  DELETE  from table
  </code></pre>