title: Stored procedure returning the result of an UPDATE
body: <p>I have a table that is used to store an incrementing numeric ID (of type INT). It contains a single row. The ID is incremented using a query:</p>
  
  <pre><code>UPDATE TOP(1) MyTable
  WITH(TABLOCKX)
  SET NextID = NextID + 1
  </code></pre>
  
  <p>I would like to move this into a stored procedure that returns the value that was in the NextID column <em>before</em> it was incremented, but am unsure how to do this using OUTPUT parameters. Any help would be appreciated.</p>