Translate

Truncate OR Delete


Truncate or  Delete ? Which one to use WHEN and WHY ? Mostly Asked by Interviewer

Truncate

  • Truncate is used to delete all the data from the table.
  • Once deleted it can't be rolled back.
  • DCL command
  • we can't use WHERE clause in DELETE command
  • FASTER

Delete


  • Delete is used to delete one or more rows 
  • It can be rolled back
  • DML command
  • we can use WHERE clause in DELETE command
  • SLOWER

Please Comment for any query ? 

No comments:

Post a Comment