TRUNCATE TABLE statement
632
If the TRUNCATE_WITH_AUTO_COMMIT option is set to ON, and all
the following criteria are satisfied, a fast form of table truncation is executed:
♦ There are no foreign keys either to or from the table.
♦ The TRUNCATE TABLE statement is not executed within a trigger.
♦ The TRUNCATE TABLE statement is not executed within an atomic
statement.
If a fast truncation is carried out, then a COMMIT is carried out before and
after the operation.
♦
SQL/92 Transact-SQL extension.
♦
Sybase Supported by Adaptive Server Enterprise.
♦ Delete all rows from the department table.
TRUNCATE TABLE department
Standards and
compatibility
Example