Altering Trigger Definitions
To modify the definition of a trigger, you can use the ALTER TRIGGER statement. In this case, the trigger will take the new definition directly. Listing 9.17 shows how to execute the ALTER TRIGGER statement to modify the tr_Employees trigger.
The syntax is identical to the CREATE TRIGGER statement. Moreover, because triggers are independent objects, no objects are depending on them. They can be dropped and re-created any time, if necessary.
Caution
You can change the name of a trigger using the sp_rename stored procedure, but this does not change the name of the trigger stored in the definition of the trigger in syscomments.
To rename a trigger, it is recommended to drop the trigger and re-create it with a ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access