Difficulty: Easy
Correct Answer: DROP TABLE CUSTOMER;
Explanation:
Introduction:
SQL distinguishes between data definition language (DDL) statements that change schema and data manipulation language (DML) statements that change row data. Knowing the correct command to remove a table is a basic DBA skill and prevents accidental misuse of DML where DDL is required.
Given Data / Assumptions:
Concept / Approach:
DROP TABLE is the DDL command that removes the table definition and, by default, its data, indexes, and constraints (subject to dependencies and DBMS rules). DELETE affects rows within an existing table; UPDATE modifies rows; REMOVE is not standard SQL. TRUNCATE TABLE removes data rows quickly but retains the table definition, so it is not equivalent to dropping the table.
Step-by-Step Solution:
1) Identify that schema removal requires DDL, not DML.2) Choose DROP TABLE for eliminating the table object.3) Exclude DELETE and UPDATE because they operate on data rows, not the schema object.4) Exclude TRUNCATE because it preserves the table definition.
Verification / Alternative check:
DBMS documentation for DROP TABLE confirms that the object is removed and dependent objects may need handling (such as foreign keys). Backups or migrations should precede destructive DDL.
Why Other Options Are Wrong:
Common Pitfalls:
Confusing TRUNCATE with DROP; TRUNCATE is irreversible for data but preserves the table, whereas DROP removes the schema object itself.
Final Answer:
DROP TABLE CUSTOMER;
Discussion & Comments