Question:medium

Which SQL command is used to remove all rows from a table without deleting the table structure?

Show Hint

Think of it this way: DELETE is like erasing lines in a notebook, TRUNCATE is like ripping out all the pages but keeping the cover, and DROP is like throwing the whole notebook in the trash!
Updated On: May 30, 2026
  • DELETE
  • DROP
  • TRUNCATE
  • REMOVE
Show Solution

The Correct Option is C

Solution and Explanation

Step 1: Understanding the Concept:
The question asks for a command that clears data while preserving the container (table schema). This involves distinguishing between Data Manipulation Language (DML) and Data Definition Language (DDL) commands in SQL.
Step 2: Detailed Explanation:
- DELETE: This is a DML command. It can remove all rows using a WHERE clause or by omitting it. However, it deletes rows one by one and records each deletion in the transaction log, making it slower for large tables.
- DROP: This is a DDL command. It removes the entire table structure along with the data. Once dropped, the table no longer exists in the database.
- TRUNCATE: This is a DDL command. It is used to delete all rows from a table. It is much faster than DELETE because it deallocates the data pages instead of logging individual row deletions. Crucially, it leaves the table structure, columns, and constraints intact.
- REMOVE: This is not a standard SQL keyword for data deletion.
Step 3: Final Answer:
The correct command to wipe data but keep the structure is TRUNCATE.
Was this answer helpful?
2


Questions Asked in CUET (UG) exam