title: Get the Identity of Last Updated Row in SQL Server
body: <p><code>@@IDENTITY</code> returns the <code>ID</code> of the last row <strong>inserted</strong>, I want to retrieve the ID of the last row <strong>updated</strong>.</p>
  
  <p>Here is my query:</p>
  
  <pre><code>UPDATE [Table] 
  SET Active = 1, 
      Subscribed = 1, 
      RenewDate = GETDATE(),
      EndDate = DATEADD(mm,1,getdate()),
  WHERE SC = @SC
    AND Service = @Ser
  </code></pre>
  
  <p>How do I get the ID of this updated row?</p>
  
  <p>The column is called <code>TableID</code> and I'm not using it in the query.</p>