GNU Info

Info Node: (mysql.info)TRUNCATE

(mysql.info)TRUNCATE


Next: REPLACE Prev: DELETE Up: Data Manipulation
Enter node , (file) or (file)node

`TRUNCATE' Syntax
-----------------

     TRUNCATE TABLE table_name

Is in 3.23 and the same thing as `DELETE FROM table_name'. Note:
DELETE.  The differences are:

   * Implemented as a drop and re-create of the table, which makes this
     much faster when deleting many rows.

   * Not transaction-safe; `TRUNCATE TABLE' will automatically end the
     current transaction as if `COMMIT' would have been called.

   * Doesn't return the number of deleted rows.

   * As long as the table definition file `table_name.frm' is valid,
     the table can be re-created this way, even if the data or index
     files have become corrupted.

`TRUNCATE' is an Oracle SQL extension.


automatically generated by info2www version 1.2.2.9