5.4k views
3 votes
To delete all the rows in a table and free up the storage space that was occupied by those rows, the ____ command should be used.​

A) REMOVE
B) DELETE
C) TRUNCATE
D) DROP

User Heitor
by
7.7k points

1 Answer

4 votes

Final answer:

The correct command to both delete all rows in a table and free up the associated storage space is C) TRUNCATE. It is more efficient than DELETE and less drastic than DROP, while REMOVE is not a standard SQL command.

Step-by-step explanation:

To delete all the rows in a table and free up the storage space that was occupied by those rows, the correct command to use is C) TRUNCATE. The TRUNCATE command efficiently removes all records from a table, effectively resetting the table to its empty state, and it also releases the storage space for reuse. In contrast, the DELETE command only removes the rows without freeing up the space, unless you run a separate command to rebuild the table. The DROP command completely removes the entire table structure and its data, and REMOVE is not a standard SQL command for modifying table data.

User Scor
by
7.8k points