IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

What are the types of triggers in DB2


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
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
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
Reply with quote

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

However, you can start here,
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
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

Moderator Emeritus


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

PostPosted: Wed Mar 14, 2007 5:44 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Log an Plan name/id or Job Id using D... DB2 1
No new posts CICS web service from DB2 Triggers or... DB2 2
No new posts Types of variables REXX TSO/ISPF 2
No new posts DB2 triggers to send realtime data DB2 2
No new posts Personal Comm. - User Defined Transfe... IBM Tools 6
Search our Forums:

Back to Top