View Single Post
  #4 (permalink)  
Old 04-25-2008, 06:07 AM
Jeyaseelansarc Jeyaseelansarc is offline
D-Web Genius
 
Join Date: Mar 2007
Location: Chennai
Posts: 1,162
Jeyaseelansarc is on a distinguished road
Send a message via AIM to Jeyaseelansarc
Default Re: Trigger in MySql

There are several reasons to use triggers. Triggers can automate a lot of stuff that you may have been doing by hand before. The main reason I use triggers is to maintain the integrity of one table that might rely on another table. For example, if TableA references TableB and a value from TableB gets deleted, you could have a trigger setup to handle the data in TableA. Perhaps the data in TableA should be reset to a generic value or maybe the data should just be deleted completely.
__________________
With,
J. Jeyaseelan

Everything Possible
Reply With Quote