.\\" auto-generated by docbook2man-spec $Revision: 1.25 $
.TH "TRUNCATE" "l" "2002-01-30" "SQL - Language Statements" "SQL Commands"
.SH NAME
TRUNCATE \- empty a table
.SH SYNOPSIS
.sp
.nf
TRUNCATE [ TABLE ] \fIname\fR
  
.sp
.fi
.SS "INPUTS"
.PP
.TP
\fB\fIname\fB\fR
The name of the table to be truncated.
.PP
.SS "OUTPUTS"
.PP
.TP
\fBTRUNCATE\fR
Message returned if the table is successfully truncated.
.PP
.SH "DESCRIPTION"
.PP
\fBTRUNCATE\fR quickly removes all rows from a
table. It has the same effect as an unqualified
\fBDELETE\fR but since it does not actually scan the
table it is faster. This is most useful on large tables.
.PP
\fBTRUNCATE\fR cannot be executed inside a transaction
block (\fBBEGIN\fR/\fBCOMMIT\fR pair), because there is
no way to roll it back.
.SH "USAGE"
.PP
Truncate the table bigtable:
.sp
.nf
TRUNCATE TABLE bigtable;
   
.sp
.fi
.SH "COMPATIBILITY"
.SS "SQL92"
.PP
There is no \fBTRUNCATE\fR in SQL92.
