~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to docs/truncate.rst

Fix merge issues with 1.0 CC fix.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
TRUNCATE
 
2
========
 
3
 
 
4
This will delete all data in a table but unlike a DROP TABLE it will allow you to keep the table in your database.
 
5
 
 
6
.. code-block:: mysql
 
7
 
 
8
        TRUNCATE TABLE table_name
 
9
 
 
10
TRUNCATE TABLE is typically faster than a DELETE * FROM TABLE query. An
 
11
unbounded DELETE query will have to generate log data for every
 
12
row in the table, which could be quite large. TRUNCATE TABLE is the same
 
13
as DROP followed by CREATE except that the absence of the table between
 
14
DROP and CREATE is not exposed.
 
 
b'\\ No newline at end of file'