Re: DBA Prep -- Sample question

From: Jonathan Wayne Ingram <jwingram_at_whale.st.usm.edu>
Date: 1996/03/11
Message-ID: <4i1ghm$uri_at_thorn.cc.usm.edu>#1/1


Steve Butler (sbut-is_at_seatimes.com) wrote:
: In a previous thread we proposed posting some of the DBA Prep questions
: that seemed to have incorrect answers. In order to generate discussion
: I'll not reveal the perported "correct" answers until folks have had a
: chance to form an opinion.
 

: QUESTION:
: A BEFORE INSERT trigger is created to do validation on a column created
: as not NULL. The purpose of the trigger is to check the contains (sic) of
: the column and display a message "Column cannot be NULL" if the column is
: NULL. What will happen? (May have multiple answers)
 

: A. The trigger will be fired and it will check value of the colmn and
: return a message when the column is NULL.
: B. The trigger will never be fired even when the column is NULL.
: C. The message "Column cannot be NULL" will never be displayed.
: D. The trigger is always fired whenever data is inserted into thie table.

Steve,
I am going to go out on a limb here and say that A is *incorrect*, because Oracle will parse the insert statement before the table is actually updated. B is obviously incorrect because if the statement parse is successful, the trigger will fire.

I think that both C and D are correct. This is my best shot, since I am unaware of any constraints on which columns can be checked in a trigger.

Jonathan Received on Mon Mar 11 1996 - 00:00:00 CET

Original text of this message