The SQL truncate command is a powerful tool used to delete all records from a table. It places a table and page lock to delete all records, and does not record the entries for each row removed from the transaction log. The TRUNCATE TABLE SQL statement is used to delete all the records in a table, performing the same function as a DELETE statement without a WHERE clause. However, it cannot be used with a WHERE clause, as it is an all or nothing operation.
Truncating simply unmaps all pages that belong to a table (or partition) and their indexes. The SQL TRUNCATE TABLE command is used to remove complete data from an existing table, while maintaining the structure of the table and its columns, constraints, indexes, etc. To delete the table definition in addition to its data, use the DROP TABLE statement.