If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Trigger for multiple actions

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-18-09, 15:26
oscarfh oscarfh is offline
Registered User
 
Join Date: Nov 2009
Posts: 7
Trigger for multiple actions

Hello,
I am using DB2 v9.5.
I want to create a trigger that I want to fire on select, update or delete,
Is it possible? What is the syntax?

CREATE TRIGGER T_UPDATESUM
BEFORE INSERT ON orders | BEFORE UPDATE ON lineitem | ......

I tried google it, but couldn't find anything very helpful.

thank you,
Oscar
Reply With Quote
  #2 (permalink)  
Old 11-18-09, 15:35
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Each action requires a separate trigger, and there is no trigger on SELECT.

CREATE TRIGGER
Reply With Quote
  #3 (permalink)  
Old 11-18-09, 16:19
oscarfh oscarfh is offline
Registered User
 
Join Date: Nov 2009
Posts: 7
Hi,
thanks for your answer..

Yes, sure there is no trigger on select, I was thinking in insert and wrote select.

Thanks
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On