CS FundamentalsEasyHCL · Tech Mahindra pattern

Which statement about the SQL command TRUNCATE TABLE is correct?

  1. A. It removes rows matching a WHERE clause
  2. B. It removes all rows but keeps the table structure
  3. C. It removes the table definition along with its data
  4. D. It only removes rows whose columns are NULL

Correct answer: B. It removes all rows but keeps the table structure

TRUNCATE empties the table and keeps its structure; DROP removes the table itself; DELETE can remove selected rows with WHERE.

More DBMS and SQL questions

Exams that ask this topic