Difficulty: Easy
Correct Answer: ALTER TRIGGER
Explanation:
Introduction / Context:
Database administrators often need to disable triggers temporarily for bulk loads or maintenance and then re-enable them. SQL dialects provide a direct command to change a trigger’s status without dropping and recreating it. This question focuses on identifying the correct command.
Given Data / Assumptions:
Concept / Approach:
In widely used systems (e.g., Oracle, SQL Server), ALTER TRIGGER is used to change a trigger’s state or definition. Typical syntax includes ENABLE or DISABLE clauses. Other commands manage different objects: ALTER TABLE changes table metadata; ALTER DATABASE affects database-level settings; “MODIFY TRIGGER” is not the standard keyword in mainstream SQL dialects.
Step-by-Step Solution:
Identify the object: trigger.Select the corresponding DDL verb: ALTER TRIGGER … ENABLE/DISABLE.Exclude unrelated ALTER commands targeting tables or databases.
Verification / Alternative check:
Vendor docs confirm: Oracle uses ALTER TRIGGER … ENABLE/DISABLE; SQL Server supports ALTER TABLE … DISABLE TRIGGER or ALTER TRIGGER for logic changes—however, “ALTER TRIGGER” is the direct, object-specific command recognized for trigger state/definition management.
Why Other Options Are Wrong:
Common Pitfalls:
Confusing vendor-specific shortcuts (e.g., disabling triggers via ALTER TABLE in some systems) with the conceptual, object-specific command asked by the question.
Final Answer:
ALTER TRIGGER
Discussion & Comments