Difficulty: Easy
Correct Answer: ALTER TABLE
Explanation:
Introduction / Context:Real-world databases evolve. You often need to add columns, enforce new constraints, or change properties without recreating the table. SQL provides a command specifically for altering the definition of existing schema objects, including tables, while preserving data where possible.
Given Data / Assumptions:
Concept / Approach:ALTER TABLE is the SQL statement used to modify table metadata: adding/dropping columns, creating/dropping constraints, and in some dialects altering data types or defaults. Pseudo-commands like “ADD COLUMN” may be clauses within ALTER TABLE, but ALTER TABLE is the full, correct command verb across SQL implementations.
Step-by-Step Solution:
Identify the operation: change table definition (columns/constraints). Recall the SQL DDL verbs: CREATE, ALTER, DROP. Map to ALTER TABLE for structural modifications. Select “ALTER TABLE.”Verification / Alternative check:Vendor documentation consistently uses ALTER TABLE ... ADD COLUMN ... or ... ADD CONSTRAINT ..., confirming the correct command name.
Why Other Options Are Wrong:
Common Pitfalls:Confusing syntax clauses with the top-level command; assuming vendor-specific shorthands are portable.
Final Answer:ALTER TABLE
Discussion & Comments