Main Menu

HOME

.Net
ASP
Assembly
C
C++
Delphi
HTML
Java
JavaScript
MySQL
PC interface
Powershell
Perl
PHP
VBScript
Visual Basic
XML

Make money selling software. Check this out here

Hosted clickbank mall. Check this out here




   Misc

   Amazon

   Links

    


Truncate syntax

 

TRUNCATE TABLE table_name

In 3.23 TRUNCATE TABLE is mapped to COMMIT; DELETE FROM table_name. See section 13.1.1 DELETE Syntax.

TRUNCATE TABLE differs from DELETE FROM ... in the following ways:

* 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 will 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 `table_name.frm' is valid, the table can be re-created this way, even if the data or index files have become corrupted.
* The table handler may not remember the last used AUTO_INCREMENT value but may start counting from the beginning. This is true for MyISAM, ISAM, and BDB tables.

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.


 

 

back to MySQL reference


 




   Sponsors
 

   Software
500 Java Tips E-book
PHP editor
PERL editor
Beginning Java
Beginning Visual Basic
Learn VB.net
Learn VB 6
VB and databases
ASP image library
C++ builder programming
C++ fundamentals

   Source Code
Random passwords(PHP)
Does a file exist(Powershell)
move a file with MoveTo(C Sharp)
drive type(VB)
.Net supported(ASP.net)
displays a list of My Computer locations(VBScript)
random boxes(Darkbasic)
A to Z links(PHP)

    




Copyright © 2004 by programmershelp.co.uk