title: Copy or Clone SQL table with constraints
body: <p>I want to create same structure of table in another table.. </p>
  
  <p>But it should create same table structure with all primary keys and indexes of that old table.</p>
  
  <p>I tried below but it copies only columns.. not primary key nor indexes.</p>
  
  <pre><code>SELECT *
  INTO dbo.NewTable
  FROM dbo.ExistingTable
  WHERE 1 = 2
  </code></pre>
  
  <p>How can I copy/clone that too?</p>