• Hi,

    I am little confused.

    From the code given for Fun with Transactions - Part III, I learned that we can commit inner transaction and then rollback/ commit outer transaction.

    ----------------------------------------------------------

    Fun with Transactions - Part III code :-

    CREATE TABLE MyTable (MyId INT IDENTITY (1,1),

    MyCity NVARCHAR(50))

    BEGIN TRANSACTION OuterTran

    INSERT INTO MyTable VALUES ('Boston')

    BEGIN TRAN InnerTran

    INSERT INTO MyTable VALUES ('London')

    COMMIT TRAN InnerTran

    ROLLBACK TRANSACTION OuterTran

    SELECT * FROM MyTable

    DROP TABLE MyTable

    ----------------------------------------------------------

    Where as for Fun with Transactions - Part IV, We cannot rollback inner transaction. Instead of starting a nested transaction the outer transaction was saved to a savepoint and then rollback upto the savepoint. I feel this is not a nested transaction. There is only one transaction which is saved to a savepoint and can be commtted / rolled back upto the save point. Please correct me if I am wrong.

    After reading the earlier discussions I am still not clear on how to use nested transactions. Can any one explain?

    Thanks.