Question about Triggers (after insert)

  • Hello all,

    I'm in the process of debugging a trigger i've written (which hasn't been any fun) and i have a question.

    records for the table with the trigger are only inserted from a SP using an INSERT INTO ... SELECT statement. Multiple rows at a time.

    question is..

    does the trigger fire once for that insert into ... select or does it fire for each new row inserted by that statement. I was under the impression that it fires for each row but i'm not sure now because the table the trigger inserts to only has one row after the SP is run.

    any help is greatly appreciated.

    Will

  • Fires once per transaction. 

     

    The tables deleted and inserted accessible from the trigger contain all the row(s) inserted or deleted (both tables are filled for an update query).

     

    Post more details if you need further help to make your trigger set-based.

  • thanks..

    i found a similarly worded answer in the msdn documentation while waiting for a reply.

    I may very well be coming back for more help but i first have to apply this new-found information to my process and see what i can come up with.

    Thanks!

    ws

  • Great.. if only all users were like you .

Viewing 4 posts - 1 through 3 (of 3 total)

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