Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2004
    Posts
    7

    Unanswered: 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

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    A trigger fires once per transaction, not once per row. All triggers should be coded to handle multi-record transactions.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  3. #3
    Join Date
    Jul 2004
    Posts
    7
    thanks..

    now that i know that i'm not sure a trigger will be a good solution for my problem.

    Probably going to post a new thread for my problem shortly

    thanks again.
    ws

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •