title: WITH CHECK ADD CONSTRAINT followed by CHECK CONSTRAINT vs. ADD CONSTRAINT
body: <p>I'm looking at the AdventureWorks sample database for SQL Server 2008, and I see in their creation scripts that they tend to use the following:</p>
  
  <pre><code>ALTER TABLE [Production].[ProductCostHistory] WITH CHECK ADD 
  CONSTRAINT [FK_ProductCostHistory_Product_ProductID] FOREIGN KEY([ProductID])
    REFERENCES [Production].[Product] ([ProductID])
  GO
  </code></pre>
  
  <p>followed immediately by :</p>
  
  <pre><code>ALTER TABLE [Production].[ProductCostHistory] CHECK CONSTRAINT     
  [FK_ProductCostHistory_Product_ProductID]
  GO
  </code></pre>
  
  <p>I see this for foreign keys (as here), unique constraints and regular <code>CHECK</code> constraints; <code>DEFAULT</code> constraints use the regular format I am more familiar with such as:</p>
  
  <pre><code>ALTER TABLE [Production].[ProductCostHistory] ADD  CONSTRAINT  
  [DF_ProductCostHistory_ModifiedDate]  DEFAULT (getdate()) FOR [ModifiedDate]
  GO
  </code></pre>
  
  <p>What is the difference, if any, between doing it the first way versus the second?</p>