Wednesday, December 2, 2009

Triggers: Sample DML trigger

CREATE trigger [dbo].[Triggername]
ON [dbo].[Table_exist]
FOR update
AS

declare @userid int
select @userid=userid from deleted d
insert into Tble (userid) values(@userid)

No comments:

Post a Comment