Multiple choice

What does the TRUNCATE statement do?

  1. Removes the table

  2. Removes all rows from a table

  3. Shortens the tale to 10 rows

  4. Removes all columns from a table

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

TRUNCATE removes all rows from a table while keeping the table structure intact. Unlike DELETE (which is DML and can be rolled back), TRUNCATE is DDL that deallocates data pages and cannot be rolled back. It's faster but doesn't support WHERE clauses.