Difficulty: Easy
Correct Answer: Drop the foreign key constraint.
Explanation:
Introduction / Context:
Foreign keys enforce referential integrity between a child table and a parent table. DDL operations that remove or alter the foreign-key column must respect these constraints to keep the catalog in a consistent state.
Given Data / Assumptions:
Concept / Approach:
Because the column is referenced by a constraint, the DBMS will block dropping it until the constraint is removed or altered. The correct sequence is to drop (or disable, depending on the DBMS) the foreign key constraint first, then drop the column. Dropping the primary key or the entire table is unnecessary and destructive relative to the stated goal.
Step-by-Step Solution:
Verification / Alternative check:
DBMS documentation universally prevents dropping a constrained column without first removing the dependent constraint, confirming the required order of operations.
Why Other Options Are Wrong:
Common Pitfalls:
Final Answer:
Drop the foreign key constraint.
Discussion & Comments