Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
JacobPressures
Posting Yak Master
112 Posts |
Posted - 2005-08-22 : 11:25:25
|
| Should i create only one trigger for each table and put all the table functionality in that one trigger?For example: tr_tblCategory, tr_tblQuestion, tr_tblAnswerOr should i create a different trigger for each different function on that table?For example: trReviseDate, trDoThis, trDoThat, trVerifyThisIs there a better practice in this area?What do you typically do?Thanks! |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-08-22 : 15:47:11
|
| I do it all in one trigger [for each table]. I'm then sure I haven't overlooked some other forgotten trigger that might going to be calling in on the act!Kristen |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-08-22 : 15:50:24
|
| Why isn't this stuff built into the stored procedure?Tara |
 |
|
|
JacobPressures
Posting Yak Master
112 Posts |
Posted - 2005-08-22 : 16:16:37
|
Thanks Kristen!quote: Originally posted by tduggan Why isn't this stuff built into the stored procedure?Tara
I'm a newbie, and the books i've read said that everything no handled by a contraint should be put into a Trigger the so called next best thing.I'm just using the trigger to enforce business rules. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-08-22 : 16:19:21
|
quote: Originally posted by JacobPressures Thanks Kristen!quote: Originally posted by tduggan Why isn't this stuff built into the stored procedure?Tara
I'm a newbie, and the books i've read said that everything no handled by a contraint should be put into a Trigger the so called next best thing.I'm just using the trigger to enforce business rules.
Oh my! What book is this?Tara |
 |
|
|
|
|
|