title: How can I reset IDENTITY column of my table in SQL Server?
body: <p>How can I reset my <code>IDENTITY</code> column in my already populated table?</p>
  
  <p>I tried something like this, but it's not working</p>
  
  <pre><code>WITH TBL AS
  (
      SELECT 
          *, 
          ROW_NUMBER() OVER(ORDER BY profile_id) AS RN
      FROM 
          Profiles
  )
  UPDATE TBL
  SET profile_id = RN
  </code></pre>
  
  <p>ERROR: </p>
  
  <blockquote>
    <p>Cannot update identity column 'profile_id'.</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/cEZsL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cEZsL.png" alt="enter image description here"></a></p>