AgQuiz #3 – Delete Table

This is a regular “data quiz”. Follow it on LinkedIn. Test your knowledge or learn something new.

Today Question:

Which SQL command deletes a table along with its structure?

A) DELETE 

B) DROP 

C) TRUNCATE 

D) REMOVE


Correct Answer: B

Explanation

The DROP command is one of the most destructive SQL commands, which completely removes a table from the database including its structure, data, indexes, triggers, and all related objects. Unlike DELETE, which only erases data but preserves the table structure, DROP TABLE completely eliminates the table. After executing DROP TABLE, the table no longer exists and cannot be referenced in any queries. TRUNCATE also deletes all data but preserves the table structure for future use. DROP is used during database refactoring when we need to completely remove unnecessary tables. It’s a DDL (Data Definition Language) command that usually cannot be rolled back in a transaction. Before using DROP TABLE, it’s important to create a data backup because the operation is irreversible. In production systems, the DROP command should be protected by proper permissions and change approval procedures.