Which statement about DROP vs. DELETE is true in SQL?

2025

Which statement about DROP vs. DELETE is true in SQL?

  1. A.

    DROP can be rolled back; DELETE cannot.

  2. B.

    DROP is a DML command; DELETE is DDL.

  3. C.

    DROP removes table structure; DELETE removes only data.

  4. 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.

  1. 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 SELECT query on that table name will throw an "object not found" compilation error.

  2. The DELETE Command (DML):

    • Scope: It acts on the data level. When you execute DELETE FROM employees; (without a WHERE clause), 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.

Explore the full course: Niacl Ao It Specialist