Sunday, April 21, 2013

Difference between Delete and Truncate

Difference between Delete and Truncate:


Delete  Truncate
1 Delete activates Triggers Truncate does not activates Triggers
2  It’s a DML Command It’s a DDL Command
3 Can be Roll-backed Cannot be Roll-backed
4 It is slower as compared to truncate Its is Faster
5 Can use Where clause in the delete command Cannot use Where clause in the truncate command
6 Each Table Row is locked while deleting Whole Table is Locked while performing truncate operation 
7 Maintains the identity of the column Does not maintain the identity of the column


Delete Command Maintains Identity of the Column

Protected by Copyscape Duplicate Content Detection Tool

No comments:

Post a Comment