title: Set column as primary key if the table doesn't have a primary key
body: <p>I have a column in db which has 5 columns but no primary key.
  One of the columns is named myTable_id and is integer.</p>
  
  <p>I want to check if the table has a primary key column. If it doesn't, then make myTable_id a primary key column and make it identity column. Is there a way to do this?</p>
  
  <p>I tried with this:</p>
  
  <pre><code>ALTER TABLE Persons
  DROP CONSTRAINT pk_PersonID
  
  ALTER TABLE Persons
  ADD PRIMARY KEY (P_Id)
  </code></pre>
  
  <p>and I get syntax error in Management studio.</p>