title: I got error "The DELETE statement conflicted with the REFERENCE constraint"
body: <p>I tried to truncate a table with foreign keys and got the message:</p>
  
  <blockquote>
    <p>"<strong>Cannot truncate table  because it is being referenced by a FOREIGN KEY constraint</strong>". </p>
  </blockquote>
  
  <p>I read a lot of literature about the problem and thought that I found the solution by using delete </p>
  
  <pre><code>DELETE FROM table_name DBCC CHECKIDENT (table_name, RESEED, 0)
  </code></pre>
  
  <p>But I still got an error message:</p>
  
  <blockquote>
    <p>"<strong>The DELETE statement conflicted with the REFERENCE constraint</strong>". </p>
  </blockquote>
  
  <p>When I try to delete with Microsoft Management Studio and execute the previous query </p>
  
  <pre><code>DELETE FROM table_name DBCC CHECKIDENT (table_name, RESEED, 0)
  </code></pre>
  
  <p>it doesn't give an error and works properly. I want to delete all information from a table and add new into it, but I don't want to drop and create foreign keys.</p>