The TRUNCATE() Statement

The TRUNCATE() function is part of a suite of DDL (Data Definition Language) command and is used to delete all the rows.

Cannot Rollback Changes!

In the TRUNCATE command, the transaction log for each deleted data page is not recorded. We cannot roll back the data after using the TRUNCATE command.  Unlike the DELETE command, the TRUNCATE command is fast.

Syntax

TRUNCATE TABLE tableName;
Powered by Forestry.md