Re: Sequence and inserting row

From: Brian Dick <bdick_at_home.com>
Date: Wed, 05 Dec 2001 03:10:17 GMT
Message-ID: <tegP7.23321$Xb7.203319_at_news1.wwck1.ri.home.com>


[Quoted] When you manually insert the row, use INSERT (ID, ...) INTO ... SELECT MYSEQ.NEXTVAL, ... FROM DUAL to keep the sequence up to date.

or

Populate the ID column in an insert trigger that cannot be circumvented.

"Brice" <brice_news_at_roads.fr.st> wrote in message news:3C0D0F44.60000_at_roads.fr.st...
> Stjepan,
>
>
> >Primary Key Column (ID) (unique) is populated from sequence and i.e.
> >current lastvalue of sequencer is 500. After that I manually insert row
> >with ID=600. What would happend when sequencer reaches number 600 and I
> >want to insert new row?
> >
> You would get a Primary Key violation and the row wouldn't get inserted.
>
Received on Wed Dec 05 2001 - 04:10:17 CET

Original text of this message