title: How can I create a unique constraint on my column (SQL Server 2008 R2)?
body: <p>I have SQL Server 2008 R2 and I want to set a unique column.  </p>
  
  <p>There seems to be two ways to do this: "unique index" and "unique constraint".  They are not much different from what I understand, although unique constraint is recommended by most, because you also get an index automatically.</p>
  
  <p>How do I create a unique constraint?  </p>
  
  <pre><code>ALTER TABLE Customer ADD CONSTRAINT U_Name UNIQUE(Name)
  </code></pre>
  
  <p>Is there a way to create a unique constraint through the SQL Server Management Studio?</p>