title: Truncating a table referenced by a foreign key
body: <p>We have two tables in a SQL Server 2005 database, A and B.There is a service which truncates table A every day.</p>
  
  <p>Recently, a foreign key constraint was added to table B, referencing table A. As a result, it isn't possible truncating table A anymore, even if table B is empty. Is there any workaround to get the same result as truncating table A?</p>
  
  <p>I've already tried the approach below but the identity wasn't reset.</p>
  
  <pre><code>DBCC CHECKIDENT (TABLENAME, RESEED, 0)
  </code></pre>
  
  <p>PS. before anyone points this as a duplicate, the different thing here is that I'm not allowed to drop constraints, nor creating any.</p>