title: Get the list of unique constraints and indexes in a database
body: <p>I have to get the list of all the unique key constraints and the indexes of a particular database. I am doing something like this:</p>
  
  <pre><code>SELECT * FROM sys.sysobjects WHERE type!='u' AND name LIKE &lt;tablename&gt; 
  </code></pre>
  
  <p>Just wanted to confirm if this was the correct way, or is there a better way of doing the same thing?</p>