Delete is DML command used to delete rows from a table. A where clause can be used to remove some rows.If no where clause is specified all rows will be removed.After delete operation you need to commit or Rollback the transaction to make the transaction permanent or to undo it.
On the other hand Truncate is a DDL Command remove all rows from the table.The operation cannot be rolled back.As such truncate is faster and does not use as much undo space as delete.
Interviews3 answers
What is the difference between TRUNCATE and DELETE commands?
Pradeep
Posted Aug 19, 2009, 8:56 PM EDT3 Answers
Priyadarshi DattaPosted Oct 30, 2009, 4:15 AM EDT
delete is DML cmd so we hav to save after delete i.e. no autosave
truncate is DDL cmd so autosave
and truncate is faster than delete
bcoz delete cmd deletes rows one by one
f kPosted Sep 7, 2009, 3:18 AM EDT
Truncate is faster than delete because the Delete command deletes the records row by row
and command truncate delete all at once
Juan LagoPosted Aug 23, 2009, 8:42 AM EDT