title: Incrementing an Integer in SQL Server
body: <p>Noob question here, every time I change a certain record in an SQL Server 2008 R2 table, I want to increment a RevisionId record; to do so, I'm using the following syntax:</p>
  
  <pre><code>UPDATE TheTable
  SET RevisionId=(SELECT RevisionId
                  FROM TheTable
                  WHERE Id=@id) + 1
  WHERE Id=@id;
  </code></pre>
  
  <p>Btw, I'm going to put this into a trigger so that this happens automagically, but while this code works, it feels pretty clunky&mdash;any cleaner way to do this?</p>