TRUNCATE TABLE removes all of the records in a table without logging a transaction. : TRUNCATE table « Table « SQL Server / T-SQL Tutorial






6> CREATE TABLE employee(
7>    id          INTEGER NOT NULL PRIMARY KEY,
8>    first_name  VARCHAR(10),
9>    last_name   VARCHAR(10),
10>    salary      DECIMAL(10,2),
11>    start_Date  DATETIME,
12>    region      VARCHAR(10),
13>    city        VARCHAR(20),
14>    managerid   INTEGER
15> );
16> GO

2>
3> TRUNCATE TABLE Employee
4>
5>
6>
7> drop table employee;
8> GO








3.8.TRUNCATE table
3.8.1.TRUNCATE TABLE removes all of the records in a table without logging a transaction.
3.8.2.Benchmarking the TRUNCATE and Delete