title: Auto Increment in SQL Server 2012
body: <p>I have an existing database, with a table <code>Categories</code>, where I have a primary key on a column <code>id</code>. I have a lot of rows in my database, so I don't want to make it from the beginning.</p>
  
  <p>I forgot when I was creating it to do AUTO_INCREMENT in <code>Categories</code>, so now I try to update it, but I get an error:</p>
  
  <blockquote>
    <p>Msg 102, Level 15, State 1, Line 1<br>
    Incorrect syntax near 'MODIFY'.</p>
  </blockquote>
  
  <p>This is my code</p>
  
  <pre><code>ALTER TABLE Categories MODIFY id INT AUTO_INCREMENT;
  </code></pre>
  
  <p>Does anyone know what I do wrong? </p>