Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How triggers execute?

Posted on 2007-12-03
3
217 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 500 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
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…

808 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