Comparison of SQL Delete, Truncate and Drop


Delete

  1. It is a DML statement
  2. Rollback is possible after execution
  3. Triggers can fire out
  4. Where clause can use for condition
  5. Table structure will exists

Truncate

  1. It is a DDL statement
  2. Rollback not possible
  3. Trigger fire out not possible
  4. Cant apply where clause
  5. It is very fast compare to delete
  6. Table structure will exists

Drop

  1. Table structure will not exists 
  2. Roll back not possible

No comments:

Post a Comment

Confusion Matrix + Precision/Recall (Super Simple, With Examples)

  Confusion Matrix + Precision/Recall (Super Simple, With Examples) 1) Binary Classification Setup Binary classification means the model p...

Featured Posts