Headder AdSence

What is the difference between DELETE and TRUNCATE statements?


                                                           TRUNCATE vs DELETE
















TRUNCATE
DELETE
Truncate is used to delete the all records in table
Delete is used to delete the row level and table level data
We can’t rollback the data
We can rollback data if we maintain the transaction
It’s auto committed
It’s explicit committed
It’s a DDL (Data Definition Language) Command
It’s a DML (Data Manipulation Language) Command
It’s faster than the delete
It’s very slow when we compare with TRUNCATE



1 comment:

  1. Hi, This is so informative blog, I am doing course on SQL BI Course and this blog is really informative for me. Thank you for this blog!

    ReplyDelete