🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: SQL Basics: all 10 questions

Quiz: SQL Basics · Question 8 of 10

You must remove all rows from a huge log table quickly but keep the table. Which command fits best?

You must remove all rows from a huge log table quickly but keep the table. Which command fits best?

  1. A.DROP TABLE
  2. B.TRUNCATE TABLE
  3. C.DELETE with no WHERE, row by row
  4. D.ALTER TABLE
Answer & explanation

Correct answer: TRUNCATE TABLE

TRUNCATE removes all rows fast and keeps the structure.

Can you get the rest right without peeking?

Take the timed Quiz: SQL Basics quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →