Re: CREATING SEQUENCES - HELP PLEASE

From: Ed Bradt <ebradt_at_lilly.com>
Date: 1997/10/20
Message-ID: <344B7AFE.3069_at_lilly.com>#1/1


Javier Riera wrote:
>
> I am trying to build a table where the identifier must autocalculates
> its own value. Has the sequence object this property?
> I created a secuence as:
>
> CREATE SEQUENCE miSeq
> INCREMENT BY 1
> START WITH 0
> MINVALUE 0
> MAXVALUE 9999999
> NOCYCLE
> CACHE 20
> NOORDER
> ;
>
> How can I assign this sequence to my table's identifier?
>
> Thanks.

create a before insert triger that assigns miSeq.nextval as the values of your column.
Ed Bradt Received on Mon Oct 20 1997 - 00:00:00 CEST

Original text of this message