Advertisement
S_Madanska

@@trancount

Nov 14th, 2021 (edited)
488
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.31 KB | None | 0 0
  1. PRINT @@TRANCOUNT  
  2. --  The BEGIN TRAN statement will increment the transaction count by 1.  
  3. BEGIN TRAN  
  4.     PRINT @@TRANCOUNT  
  5.     BEGIN TRAN  
  6.         PRINT @@TRANCOUNT  
  7. --  The COMMIT statement will decrement the transaction count by 1.  
  8.     COMMIT  
  9.     PRINT @@TRANCOUNT  
  10. COMMIT  
  11. PRINT @@TRANCOUNT  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement