Rathrola Prem Kumar
When to user Truncate Delete in SQL?
By Rathrola Prem Kumar in SQL Server on Dec 17 2016
  • Rathrola Prem Kumar
    Dec, 2016 17

    1.TRUNCATE is a DDL command, whereas DELETE is a DML command.2.We can’t execute a trigger in case of TRUNCATE whilst with DELETE, we can accomplish a trigger.3.TRUNCATE is quicker than DELETE, for the reason that when we use DELETE to delete the data, at that time it store the whole statistics in the rollback gap on or after where we can get the data back after removal. In case of TRUNCATE, it will not store data in rollback gap. rub it out. TRUNCATE do not recover the deleted data.4.We can use any condition in WHERE clause using DELETE but it is not possible with TRUNCATE.5.If a table is referenced by any foreign key constraints, then TRUNCATE won’t work

    • 1


Most Popular Job Functions


MOST LIKED QUESTIONS