title: Purpose of nested transactions
body: <p>I have never understood what a nested transaction is good for. Committing a nested transaction commits nothing - it just decreases <code>@@TRANCOUNT</code>. And <code>ROLLBACK</code> rollbacks everything.</p>
  <pre><code>BEGIN TRANSACTION
     //do an update
     BEGIN TRANSACTION
       //do an insert
     COMMIT TRANSACTION
  COMMIT TRANSACTION
  </code></pre>
  <p>What is the difference with this:</p>
  <pre><code>BEGIN TRANSACTION
       //do an update
       //do an insert
  COMMIT TRANSACTION
  </code></pre>
  <p>Please give me an example why should nested transactions be used and how they make a difference.</p>