Difficulty: Easy
Correct Answer: Incorrect
Explanation:
Introduction / Context:
Understanding the differences among DELETE, TRUNCATE, and DROP is essential. DELETE removes rows; TRUNCATE quickly removes all rows; DROP removes the table object (structure) itself. This question asks whether DELETE removes both structure and data.
Given Data / Assumptions:
Concept / Approach:
DELETE is a Data Manipulation Language (DML) operation that affects table contents (rows) and is typically transactionally logged, allowing rollback. The table definition persists. To remove structure, Data Definition Language (DDL) DROP TABLE is used. TRUNCATE TABLE is DDL (or DML-like in some vendors) that removes all rows more efficiently but still keeps the structure.
Step-by-Step Solution:
Verification / Alternative check:
After DELETE, DESCRIBE or SELECT * FROM t still works; after DROP TABLE, the object no longer exists and queries fail.
Why Other Options Are Wrong:
Common Pitfalls:
Confusing TRUNCATE with DROP; assuming DELETE without WHERE equals DROP (it does not—structure remains).
Final Answer:
Incorrect
Discussion & Comments