In transact-sql, what is the purpose of enclosing different actions between "begin transaction" and "commit transaction"
I noticed that when an exception is thrown in the middle of the function It Does not roll back the transaction. if an error occurs, How to roll back the transaction?