Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Single Trigger on multiple tables

Status
Not open for further replies.

bheemsen

Programmer
May 9, 2002
22
US
Hi Guys,

Does any know whether it is possible to create one trigger on multiple tables. What I mean to say is :

Assume ther are 3 tables X, Y, Z.
I want to insert a row into the table A for any UPDATE, INSERT or DELETE action on any of the X, Y, Z tables.

I want to accomplish the above using one trigger only.

Please help me or point me to any references.

thanx..
-Bheemsen
 
I don't think it can be done. But I have been supprised before.

What you might be able to do is put most of code in a stored proc. But as far as I know you would still need to call the stored proc. from three different triggers.
 
Agree, triggers are table specific. But youcan call a stored procedure from a trigger, so you could write the complicated code once and then just get the parameters for the procedure from the trigger.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top