Difference between Delete and Truncate

In this article, we will see major difference between Delete and Truncate in RDBMS systems.

Delete Truncate
Delete is DML command Truncate is DDL command
With this can delete all or specific rows This is used to delete all rows
Deletes row by row This deletes all rows without reading data
This is used by developers This is used by database administrator
Triggers can be created on Delete Triggers cant be created on Truncate
In delete, we can use where clause In truncate, can’t use where clause
Delete slow process compared to Truncate Truncate is faster than Delete

Leave a Reply

Your email address will not be published. Required fields are marked *