stored procedures

  • Hi, i'm new to stored procedures. How can i write a procedure that appends data from table A to table B whenever there is an update in table A everytime? (like a trigger called everytime A updates B?)

  • It's best done with a trigger. BOL has a pretty good section on them. You'll wan to do something like this:

    create trigger i_tablename on tablename for update as

    set nocount on

    insert into tableb (f1,f2,etc) select f1, f2, etc from inserted

    Andy

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply