CREATE TRIGGER trigger_name ON table { FOR | AFTER | INSTEAD OF } { [DELETE] [,] [INSERT] [,] [UPDATE] } AS sql_statements
DISABLE TRIGGER trigger_name ON table
UPDATE (column)
INSERT
UPDATE
COLUMNS_UPDATED() {bitwise_operator} updated_bitmask
deleted
inserted
SELECT * FROM deleted
create trigger trgPeople on dbo.People for update as update dbo.People set UpdatedOn = getutcdate() where id in (select id from inserted)
ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.