• Hugo Kornelis (2/6/2012)


    Stewart "Arturius" Campbell (2/6/2012)


    A TRUNCATE can be rolled back in Oracle as well....

    I've never used Oracle, so I can't speak from experience - but the official Oracle documentation disagrees with you:

    http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_10007.htm

    "Caution:

    You cannot roll back a TRUNCATE TABLE statement, nor can you use a FLASHBACK TABLE statement to retrieve the contents of a table that has been truncated."

    In addition, a TRUNCATE TABLE statement is considered as a DDL operation in Oracle. DDL operations cannot be committed or rolled back explicitly in Oracle. http://docs.oracle.com/cd/E11882_01/server.112/e26088/statements_1001.htm

    Data Definition Language (DDL) Statements

    Oracle Database implicitly commits the current transaction before and after every DDL statement.

    The DDL statements are:

    ALTER

    ...

    TRUNCATE