T-SQL Tutorial

T-SQL Alter DML Trigger


Alter DML Trigger Example

Customer table

IDLastNameFirstNameAddressCityType
1HarryHowardaaaNew YorkI
2COMP INCbbbBostonC
3LindaAndersoncccBostonI
4RonaldHalldddSan DiegoI
5INSURANCE INCeeeChicagoC

CREATE TRIGGER Customers_Op
      ON Customers
 AFTER UPDATE
AS
   UPDATE Customers
         SET address = 'home'
    WHERE id = 5
GO

ALTER TRIGGER Customers_Op
     ON Customers
AFTER INSERT,UPDATE
AS
   UPDATE Customers
         SET address = 'home'
    WHERE id = 5
GO

See also:
SQL Server -> Alter trigger syntax