1. Home
  2. Database Management Systems
  3. Database Management Systems
  4. Which SQL command removes all rows from a table but keeps…

Added 2 Nov 2026

Which SQL command removes all rows from a table but keeps the table structure, usually faster than DELETE?

  1. ALTER
  2. ROLLBACK
  3. DROP
  4. TRUNCATE Correct answer

Correct answer

D. TRUNCATE

16 views

MCQSEXAM

Explanation

TRUNCATE deallocates the data pages, keeping the table and resetting AUTO_INCREMENT in MySQL. DROP deletes the whole table, and DELETE removes rows one by one and can use a WHERE clause.

Reference

Asked in: GATE CS, NTS, PPSC, FPSC

Preparing for an exam?

Doubts & discussion

Not sure why the answer is D? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Database Management Systems MCQs

Practise all Database Management Systems MCQs

Similar MCQs