Monday, March 2, 2009

Difference between Delete and Truncate

a..DELETE command can be rolled back but TRUNCATE cannot be rolled back
b..Delete is a DML command. Truncate is a DDL command.
c..Delete will delete one by one row and also return the no of row deleted but truncate will drop table and recreate it it will not return the no of rows deleted hence truncate is faster then delete
d.. DELETE we can specify WHERE clause to delete selective rows whereas with TRUNCATE we can’t.

No comments:

Post a Comment