Modifying and Renaming a Trigger

Creating and Maintaining Databases

Creating and Maintaining Databases

Modifying and Renaming a Trigger

If you must modify the definition of a trigger, you can either drop and re-create the trigger or redefine the existing trigger in a single step.

If you change the name of an object referenced by a trigger, you must modify the trigger so that its text reflects the new name. Therefore, before renaming an object, display the dependencies of the object first to determine if any triggers are affected by the proposed change.

You can also rename a trigger. The new name must follow the rules for identifiers. You can rename only the triggers that you own, but the database owner can change the name of any user's triggers. The trigger to be renamed must be in the current database.

A trigger can also be modified to encrypt its definition.

To modify a trigger

Transact-SQL