TRUNCATE TABLE empties a table completely.
Logically, this is equivalent to a DELETE statement that deletes all
rows, but there are practical differences under some circumstances.

For InnoDB before version 5.0.3, TRUNCATE TABLE is
mapped to DELETE, so there is no difference.  Starting with
MySQL/InnoDB-5.0.3, fast TRUNCATE TABLE is available.  The
operation is still mapped to DELETE if there are foreign
key constraints that reference the table.

For other storage engines, TRUNCATE TABLE differs from
DELETE FROM in the following ways from MySQL 4.0 and up:

 --- Truncate operations drop and re-create the table, which is much faster
than deleting rows one by one.
 --- Truncate operations are not transaction-safe; you get an error if
you have an active transaction or an active table lock.
 --- The number of deleted rows is not returned.
 --- As long as the table definition file *tbl_name.frm is
valid, the table can be re-created as an empty table with TRUNCATE
TABLE, even if the data or index files have become corrupted.
 --- The table handler does not remember the last used AUTO_INCREMENT
value, but starts counting from the beginning.  This is true even for
MyISAM and InnoDB, which normally does not reuse sequence values.

In MySQL 3.23, TRUNCATE TABLE is mapped to
COMMIT; DELETE FROM tbl_name, so it behaves like DELETE.
See also : [DELETE,  , DELETE].

TRUNCATE TABLE is an Oracle SQL extension.
This statement was added in MySQL 3.23.28, although from 3.23.28
to 3.23.32, the keyword TABLE must be omitted.
