The difference between TRUNCATE , DELETE and DROP is one of the most common interview question.

Please log in or register to like posts.

The difference between TRUNCATE, DELETE, and DROP is one of the most common interview questions.

TRUNCATE

  • Truncate uses the less transaction space than Delete statement.
  • Truncate cannot be used with indexed views.

DELETE


  • DELETE is a DML command.
  • DELETE is executed using a row lock, each row in the table is locked for deletion.
  • We can use where clause with DELETE to filter & delete specific records.

DROP

  • The DROP command removes a table from the database.
  • All the tables’ rows, indexes, and privileges will also be removed.
  • No DML triggers will be fired.
  • The operation cannot be rolled back.

get more detail to click 

Reactions

0
0
0
0
0
0
Already reacted for this post.

Reactions

Leave a Reply

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