• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 246
  • Last Modified:

How triggers execute?

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
vielkacarolina1239
Asked:
vielkacarolina1239
  • 2
1 Solution
 
Ashish PatelCommented:
Yes it will fire 50 times and it will be applied when you use a program too for inserting.
0
 
Ashish PatelCommented:
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
 
vielkacarolina1239Author Commented:
Thanks, now I am cleared
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now