Difficulty: Easy
Correct Answer: ALTER TABLE
Explanation:
Introduction / Context:
Integrity constraints (PRIMARY KEY, UNIQUE, FOREIGN KEY, CHECK) enforce data correctness and relationships. After deployment, administrators may need to enable, disable, or drop a constraint temporarily (for bulk loads) or permanently (during schema changes). Selecting the correct command is essential for precise control with minimal disruption.
Given Data / Assumptions:
Concept / Approach:
The correct command for managing constraints on an existing table is ALTER TABLE. It supports adding, modifying, enabling/disabling (vendor-specific), and dropping constraints. Non-standard verbs like “DEFINE TABLE” or “MODIFY TABLE” are not part of portable SQL syntax and should be avoided unless referencing a specific vendor feature.
Step-by-Step Solution:
Verification / Alternative check:
Vendor manuals document ALTER TABLE as the entry point for constraint lifecycle management; some vendors support ENABLE/DISABLE keywords or require drop/recreate sequences.
Why Other Options Are Wrong:
Common Pitfalls:
Disabling constraints without revalidating data later; dropping constraints and forgetting to recreate them with the same semantics.
Final Answer:
ALTER TABLE
Discussion & Comments