Monday, January 12

creating trigger in sql server 2005 for an insert into a table after an insert to another table

Hope this will help you.......

Create TRIGGER
on

after insert

as
begin

set nocount on

DECLARE @empid=SELECT empid FROM inserted

insert into secondtableName(field1,field2,field3)
values (@empid, 'Not Set', 'Not Set')

end

No comments: