Export (0) Print
Expand All

Modifying and Renaming a Trigger

SQL Server 2000

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

Enterprise Manager

SQL-DMO

To rename a trigger

Transact-SQL

SQL-DMO

Note  Renaming a trigger does not change the name of the trigger in the text of the trigger definition. To change the name of the trigger in the definition, modify the trigger directly.

To view the dependencies of a trigger

Transact-SQL

Enterprise Manager

SQL-DMO

See Also

Getting Information About a View

Viewing a Table

Show:
© 2014 Microsoft