In standard SQL administration, which command is used to enable or disable an existing database trigger cleanly and safely?

Difficulty: Easy

Correct Answer: ALTER TRIGGER

Explanation:


Introduction / Context:
Triggers are database objects that fire automatically in response to data changes. Administrators often need to temporarily disable or later re-enable triggers during bulk loads, maintenance, or troubleshooting. Knowing the correct command to toggle a trigger is a basic operational skill in SQL environments.


Given Data / Assumptions:

  • We are working in an SQL-compliant relational database.
  • The trigger already exists and must be enabled or disabled.
  • User-related commands are not typically used to manage triggers.


Concept / Approach:

The appropriate DDL (Data Definition Language) statement to change properties of an existing trigger is ALTER TRIGGER. Variants across vendors may include clauses like ENABLE or DISABLE, but the canonical operation is performed through the ALTER TRIGGER statement, not through user-modification commands.


Step-by-Step Solution:

Identify the object to modify: an existing trigger.Choose the DDL verb that alters an object’s state or definition: ALTER TRIGGER.Apply ENABLE or DISABLE as supported by the specific RDBMS.Verify trigger status via system catalogs or SHOW/SELECT metadata queries.


Verification / Alternative check:

Most major RDBMSs (e.g., SQL Server, Oracle, PostgreSQL via ALTER TABLE ... DISABLE TRIGGER) use ALTER semantics to control trigger state or attachment; user commands do not affect triggers.


Why Other Options Are Wrong:

CHANGE USER / MODIFY USER: Manage accounts and permissions, not triggers.

All of the above: Incorrect because only ALTER TRIGGER is relevant.

None: Incorrect since ALTER TRIGGER exists for this purpose in mainstream systems.


Common Pitfalls:

Confusing trigger state control with user management; mixing vendor syntax without checking the object type.


Final Answer:

ALTER TRIGGER

More Questions from Database Systems

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion