Geeks Talk

Prepare for your Next Interview




Trigger

This is a discussion on Trigger within the SQL forums, part of the Databases category; if trigger is written on after update and if i am updating 100 row how many time trigger will fier. will it affect performance of database? if so what is ...


Go Back   Geeks Talk > Databases > SQL

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 03-12-2008
Junior Member
 
Join Date: Mar 2008
Location: mumbai
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
goodstudent is on a distinguished road
Question Trigger

if trigger is written on after update and if i am updating 100 row how many time trigger will fier. will it affect performance of database? if so what is the solution
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-13-2008
Moderator
 
Join Date: Jun 2007
Location: Bangalore,India
Posts: 1,432
Thanks: 8
Thanked 126 Times in 113 Posts
debasisdas will become famous soon enoughdebasisdas will become famous soon enough
Re: Trigger

Normal trigger fires only once on the event. For each row trigger fires once for each row.
Reply With Quote
  #3 (permalink)  
Old 03-14-2008
Expert Member
 
Join Date: Sep 2007
Posts: 754
Thanks: 22
Thanked 64 Times in 63 Posts
krishnaindia2007 is on a distinguished road
Re: Trigger

Quote:
Originally Posted by goodstudent View Post
if trigger is written on after update and if i am updating 100 row how many time trigger will fier. will it affect performance of database? if so what is the solution
For each row option determines whether a trigger is row trigger or statement trigger.
If you include for each row option in your trigger definition it fires 100 times otherwise it fires only once.

Last edited by krishnaindia2007 : 03-14-2008 at 07:05 AM.
Reply With Quote
Reply

  Geeks Talk > Databases > SQL


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
what is a trigger? srinu.tenali SQL Server 11 3 Weeks Ago 01:57 AM
Which trigger will fires first? JobHelper SQL 5 01-24-2008 08:54 AM
what is trigger amaravadi11 SQL 8 01-23-2008 04:10 PM
schmitt trigger cadelyhde Electrical Engineering 0 02-15-2007 10:57 AM
mutating trigger sudipta82 Oracle 1 02-08-2007 02:53 AM


All times are GMT -4. The time now is 10:09 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved