title: When I try to re-enable a constraint in SQL Server, I get "ALTER TABLE statement conflicted with COLUMN FOREIGN KEY constraint"
body: <p>I need to update few records in tables of a database. There are few foreign key constraints on these tables.</p>
  
  <p>To disable constraint, I am using this:-</p>
  
  <pre><code>ALTER TABLE Table_01 NOCHECK CONSTRAINT ALL 
  ALTER TABLE Table_02 NOCHECK CONSTRAINT ALL 
  ALTER TABLE Table_01 DISABLE TRIGGER ALL
  </code></pre>
  
  <p>To Enable constraint back, I am using this:-</p>
  
  <pre><code>ALTER TABLE Table_01 ENABLE TRIGGER ALL 
  ALTER TABLE Table_01 WITH CHECK CHECK CONSTRAINT ALL 
  ALTER TABLE Table_02 WITH CHECK CHECK CONSTRAINT ALL
  </code></pre>
  
  <p>But for some reasons, when i try to put constraint back, it gives this error:-</p>
  
  <pre><code>ALTER TABLE statement conflicted with COLUMN FOREIGN KEY constraint 'FK_Table_01_AAAAA_AAAA'. 
  The conflict occurred in database 'DB', table 'Table_02', column 'ID'.
  </code></pre>
  
  <p>Note: I have many locations where similar database is installed. so this enabled / disable constraint is working on some database but not all.</p>