What do you mean by TRUNCATE?

What do you mean by TRUNCATE?

Truncate is basically defined as : 
> It cannot be rolled back.
> It is DDL Command.
> It Resets identity of the table.
> It is faster and uses fewer system and transaction log resources than DELETE.
> It removes the data by deallocating the data pages used to store the table\'s data, and only the page deallocations are recorded in the transaction log.
> It removes all rows from a table, but the table structure, its columns, constraints, indexes and so on, remains. The counter used by an identity for new rows is reset to the seed for the column.
> We can\'t use TRUNCATE TABLE on a table referenced by a FOREIGN KEY constraint. Because TRUNCATE TABLE is not logged, it cannot activate a trigger.

Date:2010-01-09 00:00:00

Post Your Answers

User Email:

User Name:

Related SQL Subjective Links

SQL Subjective interview questions and answers for experienced and fresher