Blow mention the difference of between DELETE and TRUNCATE in MS-SQL Server.
1) Command Type
DELETE - DML(Data Manipulation Language )Command.
TRUNCATE - DDL (Data Definition Language)Command.
2) Role Back
DELETE - Can Role Back using Transactions.
TRUNCATE - Can not Role Back.
3) Identity Reset
DELETE - Identity Column didn't Reset.
TRUNCATE - Identity Column Reset.
4) Lock
DELETE - Row lock ,each row is locked to Delete.
TRUNCATE - Table lock ,whole table is locked to remove all records.
5) Where Condition
DELETE - Support for Where Condition.
TRUNCATE - Didn't Support for Where Condition.
Subscribe to:
Posts (Atom)
-
Step 1 – Create the Console Ø Click Start > Run (or press WIN + R) and type “ mmc.exe ” Ø This opens an empty Microsoft ...
-
SQL language is divided into four types of primary language statements . Follows mention regarding the four main categories of SQL stat...
-
According to SRP a class should take one responsibility and there should be one reason to change that class. When a class has more than on...