T-SQL Tutorial

T-SQL Rename Trigger


Rename Trigger Syntax

sp_rename 'Old_Trigger_Name', 'New_Trigger_Name';





Rename Trigger Example

CREATE TRIGGER Customers_Op
      ON Customers
 AFTER UPDATE
AS
   UPDATE Customers
         SET address = UPPER('ADDRESS_5')
    WHERE customer_id = 5
GO

sp_rename 'Customers_Op', 'NewCustomers_Op';

See also:
SQL Server