T-SQL » Triggers » Renaming a Trigger

Syntax:
sp_rename 'obj_name', 'obj_newname'
obj_name
The current name of the trigger.
obj_newname
The new name of the trigger.

A trigger can also be renamed. The new name should follow the same rules that are used while naming a trigger.

Examples

Code:
sp_rename 'trigAddStudents', 'trigAddStudentsNew';
Output:
Caution: Changing any part of an object name could break scripts and stored procedures. The object was renamed to 'trigAddStudentsNew'.
Explanation:

Here the name of trigAddStudents is changed to trigAddStudentsNew.

Language(s): MS SQL Server