Trigger to update two tables

  • Please help me on creating a trigger that will insert value in two tables.

    this is what i have , 2 tables (Invoice Summary,Invoice Details) and an Order tables, I need to create an insert trigger on the order table that will insert value in both Invoice summary and Invoice Details.

    Thanks and best regards,,,

  • Without knowing the DDL this is just a guess:

     create trigger blah on table 
    
    for update, insert, delete
    as
    insert into table1 select * from inserted
    insert into table2 select * from inserted

    This is probably not what you need but without more information...Post more info if this does not help.

    Ray Higdon MCSE, MCDBA, CCNA

    ------------

    Ray Higdon MCSE, MCDBA, CCNA

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

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