title: SQL 2000/2005/2008 - Find Unique Constraint Name for a column
body: <p>I have a table with a column that needs the data type upgrading.  However running any alter script causes errors due to a unnamed unique constraint.</p>
  
  <p>I need to drop this constraint but unfortunately I do not know the name.  I have a script which currently lists all the unique constraints on the table but I need to find out how to go that one step further and associate the constraint names with the columns.</p>
  
  <pre><code>Select *
  From sysobjects
  Where sysobjects.xtype = 'UQ' AND sysobjects.parent_obj= OBJECT_ID(N'Users')
  </code></pre>
  
  <p>this returns</p>
  
  <pre><code>UQ__Users__45F365D3
  UQ__Users__46E78AOC
  </code></pre>
  
  <p>I need to know which columns theses are linked to in order to delete the right one.  I need to support SQL 2000, 2005, and 2008.</p>
  
  <p>Any suggestions would be appreciated.</p>
  
  <p>Thanks
  Ben</p>