TRUNCATE versus DELETE in SQL

December 4, 2026 · Team EasyExamNotes · 1 min read (est.) · 0 comments

Share on WhatsApp

← RGPV CS-502 DBMS June 2025 solved question paper

RGPV CS-502 (GS) | June 2025 | Q4(b)

Question (restated): Explain TRUNCATE and distinguish it from DELETE.

Answer

DELETE removes rows satisfying an optional WHERE predicate; without WHERE it removes all rows. TRUNCATE removes all rows from a table without a row filter, typically by deallocating storage or resetting table structures. Both retain the table definition.

DELETE FROM Student WHERE Marks < 40;
TRUNCATE TABLE Student;

DELETE generally fires row-level delete triggers; TRUNCATE does not fire ordinary DELETE triggers, though PostgreSQL supports TRUNCATE triggers. Foreign-key references may restrict truncation. Identity reset behaviour depends on the DBMS and options. PostgreSQL supports transactional TRUNCATE; Oracle and MySQL generally perform implicit commits for ordinary TRUNCATE TABLE. Therefore rollback is not universally impossible. Use DELETE for selective removal and TRUNCATE for intentional bulk clearing, after checking dependencies, permissions and recovery requirements.

← RGPV CS-502 DBMS June 2025 solved question paper

Discussion

Ask a question, share your thoughts or report an error.

Sign in to participate in the discussion.

Join the discussion