title: Is incrementing a number with an UPDATE statement reliable on different sessions?
body: <p>Using the default isolation level:  READ COMMITTED, would the following proc be guaranteed to return a different number for each session? Basically, is it possible for one session to execute this proc at the same time as another session, and return the same value.</p>
  
  <pre><code>CREATE PROCEDURE GetNextVersion(@id uniqueidentifier)
  AS
  BEGIN
      UPDATE MySequenceTable
          SET mySequenceField = mySequenceField + 1 
      OUTPUT INSERTED.mySequenceField
      where IdField = @id
  END
  GO
  </code></pre>
  
  <p><strong>Note:</strong> We cannot use the new sequence object in SQL Server 2012, nor is this a scenario where an identity column would work.</p>