• ramonaraujop (10/5/2009)


    to do rollback in a right way,

    I wrote:

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

    BEGIN Tran t1

    DROP TABLE T

    go

    ROLLBACK

    GO

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

    SELECT * FROM T

    the Question of the Day was wrong, I guess, so, was completed with errors.

    The transaction was used before cross the word "go" so,

    I dont know why you are putting GO in between a transaction. As far as my understanding is concern, a transaction can't be splitted in two batches as you are doing by using GO.

    Now come to the second point where you mentioned it a wrong question, but the question is all about DDL Rollback... Since it is mentioned in BOL that DDL statements cannot be rolled back then why the Table exists?