Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Insert and get sys PK?

Insert and get sys PK?

From: KTL <KTL_at_retailsolutions.com>
Date: Wed, 09 Jun 1999 15:57:56 -0400
Message-ID: <375EC744.D628DEC@retailsolutions.com>


I have a table that has a numberic primary key. I also have a sequence that populates the primary key via a Before Insert trigger.

How can I insert a record, and GET the primary key assigned to that record all in one statement?

The trigger just

select filelist_seq.nextval
into :new.filelistnbr
from dual;

that is all..

Suggestions.. ?

-K Received on Wed Jun 09 1999 - 14:57:56 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US