Alter DML Trigger Example
Customer table
ID | LastName | FirstName | Address | City | Type |
---|---|---|---|---|---|
1 | Harry | Howard | aaa | New York | I |
2 | COMP INC | bbb | Boston | C | |
3 | Linda | Anderson | ccc | Boston | I |
4 | Ronald | Hall | ddd | San Diego | I |
5 | INSURANCE INC | eee | Chicago | C |
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