-
Junior Member
Re: difference between delete and truncate
Hi,
This is Veera Reddy
The difference between delete and truncate is.
if u use delete, it will delete row by row and after deletion there is a possibility of rollback your data where as if you use truncate it will delete the entire table i.e., with structure and after deletion it will recreate the structure and there is no possibility of rollback of data once you apply truncate.
-
Expert Member
Re: difference between delete and truncate
Just wanted to add one more point.
Truncate is a DDL command and Delete is a Dml command.
DDL statements perform commit implicitly. That is why your changed are committed automatically when ever you perform a DDL statement ( Create,Alter etc).
DML statements does not commit your changes. You have to commit explicitly inorder to save your changes. Examples of DML commands are insert,update, delete etc.
-
Junior Member
Re: difference between delete and truncate
Add one more point also
When Delete the Particular row the Corresponding Delete Trigger(if exists) Fire.
In Case of Truncate the Trigger is not fired.
-
Junior Member
Re: difference between delete and truncate
hi
i want to add one more point
truncate is faster then the delete and doesn't use as much undo space as delete
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules