Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

What are the types of triggers in DB2

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
Ruchira

New User


Joined: 15 Nov 2006
Posts: 6

PostPosted: Tue Mar 13, 2007 3:33 am    Post subject: What are the types of triggers in DB2
Reply with quote

What are the types of triggers. Please explain giving some example.
Thanks in Advance.
Back to top
View user's profile Send private message

wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Tue Mar 13, 2007 4:54 am    Post subject:
Reply with quote

Feels like an exam question from high school! icon_wink.gif

However, you can start here,
http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/dsnaph13/2.6?DT=20030508165437
Back to top
View user's profile Send private message
Ruchira

New User


Joined: 15 Nov 2006
Posts: 6

PostPosted: Tue Mar 13, 2007 9:55 pm    Post subject:
Reply with quote

Hi wanderer,
Thanks a lot 4 ur reply..but sorry i havent studied DB2 in high school, do you ?
Anyways some Interviewer asked exactly the same question in one interview and he again said there r 12 triggers. I didnt get it dats y put it here. Didnt get any help from your link also. Pls man, we r here 2 help each other not to offence anyone.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Mar 14, 2007 5:44 am    Post subject:
Reply with quote

Hello,

This may or may not be what your interviewer was looking for, but it does total 12. From my expreience, it is not the kind of question that would be asked by any good interviewer.

The CAPS are valid SQL statements for triggers. The Before/After is the Activation Time.

Code:

SELECT   
  Before                   
  After                   
 
VALUES               
  Before                   
  After                   
 
CALL                 
  Before                   
  After                   
 
SIGNAL SQLSTATE       
  Before                   
  After                   
 
SET  (transition variable)       
  Before                                                     
 
INSERT               
  After                   
 
UPDATE                                 
  After                   
 
DELETE                               
  After                   
 


The above info is from the linked manual. We do not need to memorize things like this, (which is why i said a good interviewer would not ask it), but we do need to be familiar with the reference material for the tools we are using/going to use. For what it is worth, i do not believe wanderer meant to offend you. I believe he chose a different way to express the thought that the question was not a good one.

Don't know if this fits anywhere in this question, but there is also a limit of 12 triggers per table. . . .

We're here if you have questions icon_smile.gif
Back to top
View user's profile Send private message
Ruchira

New User


Joined: 15 Nov 2006
Posts: 6

PostPosted: Wed Mar 14, 2007 1:36 pm    Post subject:
Reply with quote

Hi,There are 3 types of triggers available in the Database. They are

1.DML Triggers :- These are again 12 types like .. Before INSERT,UPDATE,DELETE and After INSERT,UPDATE,DELETE these 6 triggers are statement level and remaining 6 triggers for each row triggers.

2. Instead of Trggers :- These triggers can be written in Complex views.

3. System triggers :- These triggers are high level triggers. like After login, Before Shutdown etc...

I found it among most freq asked ques category in some DB2 website.
Corrections are welcome.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Types of variables REXX tvinodkumar7 TSO/ISPF 2 Wed Aug 26, 2015 6:57 pm
No new posts DB2 triggers to send realtime data rz061m DB2 2 Sat Jul 11, 2015 8:43 am
No new posts Personal Comm. - User Defined Transfe... Div Grad IBM Tools 6 Wed Mar 06, 2013 2:06 am
No new posts File Manager reading file with differ... madmartinsonxx IBM Tools 1 Wed Jan 23, 2013 11:55 pm
No new posts Component Types In Endevor srinut123 CA Products 1 Thu Aug 09, 2012 12:17 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us