db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta Satoor" <msat...@gmail.com>
Subject Re: Trigger behaviour on Batch Insert
Date Thu, 01 Feb 2007 03:39:42 GMT
I am not too clear on the question. If your question is if a single insert
statement causes 1000 rows to be inserted into a table, will the insert
trigger get fired thousand times? Then the answer is no. Following is from
the Reference manual for CREATE TRIGGER statement
A trigger defines a set of actions that are executed when a database event
occurs on a specified table. A database event is a delete, insert, or update
operation. For example, if you define a trigger for a delete on a particular
table, the trigger's action occurs whenever someone deletes a row or rows
from the table.

Mamta

On 1/31/07, Tim Troup <tim.troup@ed.ac.uk> wrote:
>
> Hi,
>
> I have a trigger which is fired when data is inserted into a
> particular table.
> If I perform a batch insert that inserts 1000 rows will the trigger
> be fired 1000 times or just the once?
>
> Thanks, Tim
>

Mime
View raw message