HomeInterview QuestionsWhat does TRUNCATE do?

What does TRUNCATE do?

🟢 Easy Conceptual Fresher level
1Times asked
May 2026Last seen
May 2026First seen

💡 Model Answer

TRUNCATE removes all rows from a table by deallocating the data pages that store the table’s data. It is a DDL operation that typically performs minimal logging, does not generate individual row delete logs, and resets any identity columns. Because it is not row‑by‑row, it is faster than DELETE for large tables. TRUNCATE cannot be used with a WHERE clause and may not be rolled back in some database systems.

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