title: How to set and index on two columns of T-SQL declared table variable?
body: <p>Using SQL Server 2008 R2</p>
  
  <p>Consider a <strong>declared</strong> table <em>variable</em> like:</p>
  
  <pre><code>DECLARE @t TABLE (PK int IDENTITY(1,1) PRIMARY KEY CLUSTERED, Col1 int, Col2 int)
  </code></pre>
  
  <p>How do I <code>CREATE NONCLUSTERED INDEX</code> of any name <code>ON @t</code> including <code>(Con1 ASC, Col2 ASC)</code></p>
  
  <p>The index should not be limited to unique values.</p>
  
  <p>For some reason I do not manage to figure this out...</p>