Skip to main content

Difference between DELETE and TRUNCATE?

Entry MS SQL
Quick Answer DELETE removes rows one at a time, logs each deletion, fires triggers, and can be rolled back. TRUNCATE removes all rows at once, logs only page deallocations, is much faster, but can't be used with triggers or foreign key constraints. TRUNCATE resets identity columns; DELETE does not.

Answer

DELETE: Row-by-row removal, fully logged.
TRUNCATE: Deallocates pages, extremely fast, minimal logging.

S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice