1878.5.5
by Brian Aker
Additional documentation. |
1 |
TRUNCATE
|
2 |
========
|
|
3 |
||
2165.2.3
by Andrew Hutchings
Add favicon to docs |
4 |
.. todo:: |
5 |
||
6 |
I don't think the below SERIAL/AUTO_INCREMENT thing below is true. |
|
1994.5.5
by Stewart Smith
add some notes on TRUNCATE, including things that should be expanded on |
7 |
|
2165.2.5
by Andrew Hutchings
Make fixes to temporal docs |
8 |
This will delete all data in a table but unlike a DROP TABLE it will allow you to keep the table in your database. It deletes the rows but leaves all counters, such as a SERIAL, in place. |
1878.5.5
by Brian Aker
Additional documentation. |
9 |
|
2165.2.5
by Andrew Hutchings
Make fixes to temporal docs |
10 |
.. code-block:: mysql |
1994.5.5
by Stewart Smith
add some notes on TRUNCATE, including things that should be expanded on |
11 |
|
1945.3.9
by Marisa Plumb
changes in cross-references |
12 |
TRUNCATE TABLE table_name |
1994.5.5
by Stewart Smith
add some notes on TRUNCATE, including things that should be expanded on |
13 |
|
14 |
TRUNCATE TABLE is typically faster than a DELETE * FROM TABLE query. An |
|
15 |
unbounded DELETE query will have to generate undo log data for every |
|
16 |
row in the table, which could be quite large. TRUNCATE TABLE is the same |
|
17 |
as DROP followed by CREATE except that the absence of the table between |
|
18 |
DROP and CREATE is not exposed. |
|
19 |