sql server - Purpose of nested transactions -


i have never understood nested transaction for. committing nested transaction commits nothing - decreases @@trancount. , rollback rollbacks everything.

begin transaction    //do update    begin transaction      //do insert    commit transaction commit transaction 

what difference this:

begin transaction      //do update      //do insert commit transaction 

please give me example why should nested transactions used , how make difference.

regards, petar

nested transactions allows code call other code (sps instance) uses transactions without committing your transaction when they commit.

that said, can use safepoints roll inside of transaction.

there's codeproject article dedicated that.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -