We’re rewarding the question askers & reputations are being recalculated! Read more.

A DDL operation that quickly removes all rows.

A DDL operation that quickly removes all rows.

In Oracle and MySQL(depending on the storage engine) the operation is not transactional and cannot be rolled back.

In PostgreSQL and SQL Server the statement must be committed or rolled back.

In SQL Server, Removes all rows from a table or specified partitions of a table, without logging the individual row deletions. TRUNCATE TABLE is similar to the DELETE statement with no WHERE clause; however, TRUNCATE TABLE is faster and uses fewer system and transaction log resources.

References:

TRUNCATE TABLE (Transact-SQL)

history | excerpt history