Re: Default sequence number

From: Wes Riding <wriding_at_shl.com>
Date: 1996/10/31
Message-ID: <3278D54A.2A63_at_shl.com>#1/1


Joe Nardone wrote:
>
> Imtiaz Ahmed (imtiaz_at_qatar.net.qa) wrote:
> : Create the Required sequence for th ID and then
> : Create a database trigger xxx before insert on <table> for each row to
> : select the value from the created sequence.
> : This way yo'll not have to include the ID value when you submit an insert
> : through SQLPLUS
> :
>
> Unfortunately (this is from memory; please check it out) you won't
> be able to declare your column NOT NULL. Apparently, Oracle checks
> NOT NULL constraints before doing the 'before-insert' and 'before-update'
> triggers.
>
> Joe

You WILL be able to declare the column NOT NULL. The NOT NULL constraints are checked after Oracle processes a Before Row trigger. We do this kind of processing all of the time. So, unless things are different after 7.0.16, the trigger/NOT NULL processing will be ok.

Wes Received on Thu Oct 31 1996 - 00:00:00 CET

Original text of this message