Difficulty: Easy
Correct Answer: DELETE FROM CUSTOMER WHERE ...
Explanation:
Introduction / Context:
SQL provides specific statements for distinct tasks: creating structures, modifying data, and dropping objects. Deleting rows is a data manipulation task and must be expressed with the correct DML statement so that the DBMS can enforce constraints, log changes, and maintain transactional integrity.
Given Data / Assumptions:
Concept / Approach:
Use DELETE to remove rows. Pair it with an appropriate WHERE clause to target only the intended subset. Without a WHERE clause, all rows are removed. DROP is for removing entire objects like tables or views; UPDATE modifies existing values; TRUNCATE removes all rows but does not accept a WHERE clause and has different logging/locking behavior depending on the DBMS.
Step-by-Step Solution:
Verification / Alternative check:
DBMS documentation shows DELETE as the canonical row-removal command with optional WHERE; DROP removes the table itself; TRUNCATE is a fast, all-rows operation without WHERE.
Why Other Options Are Wrong:
Common Pitfalls:
Final Answer:
DELETE FROM CUSTOMER WHERE ...
Discussion & Comments