In Oracle, TRUNCATE TABLE is a DDL statement that cannot be used in a transaction (or, more precisely, cannot be rolled back). AFAIK, if a transaction is executed during a transaction, the transaction ends, and then TRUNCATE is executed and it cannot be undone.
In Informix, the behavior of TRUNCATE is slightly different; you can use TRUNCATE in a transaction, but the only statements allowed after that are COMMIT and ROLLBACK.
Other DBMSs probably have their own idiosyncratic interpretations of TRUNCATE TABLE behavior.
Jonathan Leffler Oct 05 '09 at 23:49 2009-10-05 23:49
source share