← 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?
- A.DROP TABLE
- B.TRUNCATE TABLE
- C.DELETE with no WHERE, row by row
- 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 →