title: Does UPDATE increment @@trancount by 1?
body: <p>I understand that <code>BEGIN TRAN</code> increments <code>@@trancount</code> by 1 and <code>COMMIT TRAN</code> decrements <code>@@trancount</code> by 1, but what about the <code>UPDATE</code> statement? What effect does it have, especially in implicit transactions?</p>
  
  <p>I looked up info at <a href="https://docs.microsoft.com/en-us/sql/t-sql/functions/trancount-transact-sql?view=sql-server-2017" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/sql/t-sql/functions/trancount-transact-sql?view=sql-server-2017</a>
  but the <code>UPDATE</code> statement was never mentioned.</p>
  
  <pre><code>BEGIN TRY
  
      UPDATE cad
      SET [AccountExpirationDate] = DATEADD(MONTH, -13, [AccountExpirationDate])
      FROM [dbo].[CardActivationDetail] cad
      WHERE ci.[CardOrderId] = @CardOrderId;
  
  END TRY
  BEGIN CATCH
      IF @@trancount &gt; 0
          ROLLBACK TRANSACTION;
  END CATCH
  </code></pre>
  
  <p>In the example I posted this is an implicit transaction with a begin/try catch applied. How is <code>@@Trancount</code> working in this scenario? Does the Update statement increment it by 1 and the auto-commit decrement it by 1, leaving <code>@@trancount = 0</code>?</p>