?
Solved

How triggers execute?

Posted on 2007-12-03
3
Medium Priority
?
243 Views
Last Modified: 2013-11-26
Using sql server express

Lets assume that I have a table with a trigger for insert, and I want to insert 50 records into table X one by one. Would the trigger fire every time that a record is inserted into table X, that is 50 times? Would this behavior apply when I use a program to insert the records or would the trigger wait until the 50 records are inserted and then fired?
0
Comment
Question by:vielkacarolina1239
  • 2
3 Comments
 
LVL 23

Expert Comment

by:Ashish Patel
ID: 20396103
Yes it will fire 50 times and it will be applied when you use a program too for inserting.
0
 
LVL 23

Accepted Solution

by:
Ashish Patel earned 2000 total points
ID: 20396121
Answer for both you question is YES. Triggers are like rules applied on a table, so doesnt matter you do it from Query analyser or from any other program. It gets triggered when a records is inserted into a table.
0
 

Author Closing Comment

by:vielkacarolina1239
ID: 31412348
Thanks, now I am cleared
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

750 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question