Which statement about DROP vs. DELETE is true in SQL?
2025
Which statement about DROP vs. DELETE is true in SQL?
- A.
DROP can be rolled back; DELETE cannot.
- B.
DROP is a DML command; DELETE is DDL.
- C.
DROP removes table structure; DELETE removes only data.
- D.
DROP requires a WHERE clause; DELETE does not.
Attempted by 105 students.
Show answer & explanation
Correct answer: C
DROP is DDL (schema), DELETE is DML (data). DROP removes structure; DELETE removes rows.
Note for more understanding
To effectively manage structured databases, it is essential to distinguish between structural modifications and data modifications.
The DROP Command (DDL):
Scope: It acts on the schema level. When you execute
DROP TABLE employees;, the database management system completely removes the table definition, columns, indexes, permissions, and rows from the storage disk.Result: The table ceases to exist. Any subsequent
SELECTquery on that table name will throw an "object not found" compilation error.
The DELETE Command (DML):
Scope: It acts on the data level. When you execute
DELETE FROM employees;(without aWHEREclause), the database system deletes all individual row entries sequentially.Result: The table container itself remains perfectly intact in the database schema. The columns, constraints, and data types are preserved, allowing you to insert new rows into that empty table immediately.