Jump to content

Truncate (SQL)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 88.110.79.157 (talk) at 17:06, 27 August 2005. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

The Truncate statement removes all the data from a table. To be exact it creates a temp table with the same form as the original table. It then performs a drop on the original table and then performs a create table from the temp table. This is a very final way of removing the data from a table. DELETE is another way that may be more suitable as it doesnt drop the table.