|
-
Apr 13th, 2005, 03:11 AM
#1
Thread Starter
Frenzied Member
1 trigger multiple tables
Hi all,
I have a simple question. In my database I need to create triggers for serveral tables, all those triggers are exactle the same. So I wonder, is it possible to have 1 trigger which is triggerd by by different tables, or do I have to write that trigger multiple times.
-
Apr 13th, 2005, 03:41 AM
#2
Fanatic Member
Re: 1 trigger multiple tables
Triggers are based on the insert/update/delete of only the table they are linked to, therefore you'll need to have the code in a trigger on each table.
However, if the code really is identical, maybe you could put it in a stored proc and just call that from each trigger. You still have to put the call in each table trigger, but at least if you need to change the code you only need to do it in the proc?
-
Apr 13th, 2005, 03:45 AM
#3
Thread Starter
Frenzied Member
Re: 1 trigger multiple tables
I was affraid of that, but I think I ask, just in case
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|