.\\" auto-generated by docbook2man-spec $Revision: 1.25 $ .TH "TRUNCATE" "7" "2002-11-22" "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 (optionally schema-qualified) of the table to be truncated. .PP .SS "OUTPUTS" .PP .TP \fBTRUNCATE TABLE\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.