HomeInterview QuestionsWhat is the difference between DELETE and TRUNCATE…

What is the difference between DELETE and TRUNCATE?

🟡 Medium Conceptual Junior level
1Times asked
May 2026Last seen
May 2026First seen

💡 Model Answer

DELETE is a DML statement that removes rows one by one, can include a WHERE clause, logs each row deletion, fires triggers, and can be rolled back. It is slower for large tables. TRUNCATE is a DDL statement that deallocates all data pages of a table, resets identity columns, does minimal logging, cannot be used with WHERE, does not fire triggers, and is usually faster. TRUNCATE cannot be rolled back in some databases, whereas DELETE can be rolled back if executed within a transaction.

This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.

🎤 Get questions like this answered in real-time

Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers — invisible to screen sharing.

Get Assisting AI — Starts at ₹500