![]() |
How do you rollback truncate? |
[Edit] |
[Edit]
Sorry; can't rollback from a truncate
In relational database systems (RDBMSs), Truncate is a DDL command that automatically commits. It runs so fast, compared to a Delete, because it doesn't even log anything except the start point and end point of the transaction.
Delete, by comparison, is a DML command and logs all the information it needs to roll back.
In practice, most DBAs prefer to never trunc a table in a production environment. It's handy, though, in the world of prototyping, testing, or cleanup of dead databases.
First answer by TedlyW. Last edit by TedlyW. Contributor trust: 197 [recommend contributor]. Question popularity: 15 [recommend question]




