Explain the difference between the “truncate” and "delete" commands.

Showing Answers 1 - 3 of 3 Answers

suganthi

  • Sep 23rd, 2005
 

sugantim@efulgent.net.The difference between the TRUNCATE and DELETE statement is Truncate belongs to DDL command whereas DELETE belongs to DML command.Rollback cannot be performed incase of Truncate statement wheras Rollback can be performed in Delete statement. "WHERE" clause cannot be used in Truncate where as "WHERE" clause can be used in DELETE statement.

  Was this answer useful?  Yes

Nitin kumar

  • Jan 13th, 2006
 

Truncate :- It is a DDL command, used to delete tables or clusters. Since it is a DDL command hence it is auto commit and Rollback can't be performed. It is faster than delete.

Delete:- It is DML command, generally used to delete a record, clusters or tables. Rollback command can be performed , in order to retrieve the earlier deleted things. To make deleted things permanently, "commit" command should be used.

karthik

  • Jan 18th, 2006
 

When you use truncate all the space alloted for the records along with records gets deleted and if you use delete only the records are deleted and the space allocated for the records remains unaltered.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions