• QUESTION

    Is "TRUNCATE" and "ROLLBACK" reliable?

    If TRUNCATE de-allocates the pages, which can be overwritten by subsequent operations, can the ROLLBACK of a TRUNCATE operation restore the original data?

    Eg.

    BEGIN TRANSACTION

    ..

    TRUNCATE table1

    ..

    insert to other tables, which may overwrite the pages

    (meanwhile, other operations outside this transaction could also re-use the de-allocated pages)

    ....

    ROLLBACK

    Is table1 restored to its original state?