Solved

How triggers execute?

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

APEX (Application Express) is used to develop a web application from Oracle. SQL Workshop is one of the tools that comes with Oracle APEX to query or modify the database objects or to make any changes to the structure.
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now