What David said. In addition, there is a high probability that someone will
execute an statement that affects multiple rows at some time in the future
without realizing that this type of action is "not supported". Guess who
gets to clean up the data WHEN IT IS DISCOVERED?
To answer the "impact" question. The trigger will perform the appropriate
actions using the values of a single row. All other rows will be ignored.
In addition, there is no guarantee that the same logical row (first, last,
etc) will be processed during each invocation of the trigger. So if your
trigger prevents the insertion of rows that violate condition "x", the
trigger will only enforce this condition against the row it evaluates
(within the set of rows that were affected by the statement). If the
evaluated row is acceptable, then all others are implicitly accepted.
[quoted text, click to view] "Josh White" <whitegoose@inorbit.com> wrote in message
news:aafea0a8.0406022114.261c92f6@posting.google.com...
> Hi all,
>
> I'm writing a bunch of triggers for an off-the-shelf product to
> enforce some business rules not enforced by the standard product. Not
> ideal I know but its what I have to do.
>
> The application does not allow more than 1 record to be inserted at a
> time into any table. However, someone has just alerted me to the fact
> that an another application that we will be interfacing to may insert
> multiple rows at a time.
>
> I have written all my triggers based on the INSERTED table only
> containing one record. Is this going to cause problems? Can you
> explain (generally) how this will cause problems, considering I want
> my trigger to act upon every single record inserted.
>
> Thanks,
> Josh