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 -> Re: IDENTITY?

Re: IDENTITY?

From: Matthias Gresz <GreMa_at_t-online.de>
Date: 8 Apr 1998 12:11:28 GMT
Message-ID: <6gfphg$u49$1@news01.btx.dtag.de>


Hi,

take a look at sequences:

Create Sequence SEQ_YOUR_TABLE_PK ;

create or replace trigger tI_YOUR_TABLE   BEFORE INSERT
  on YOUR_TABLE
  for each row
begin

        SELECT SEQ_YOUR_TABLE_PKD.NEXTVAL INTO :new.PK FROM dual ; end;
/

On Tue, 7 Apr 1998 22:11:11 -0700, Graham Miller <gjm_at_Xenon.Stanford.EDU> wrote:

>Hello all,
>Is there any way to get Oracle7 to create a unique value for a given
>column when a row is inserted (like the IDENTITY feature in Sybase)? Any
>help would be appreciated (by email, please).
>
>later,
>graham
>
>graham miller "Computers are useless. They can only
>gjm_at_cs.stanford.edu give you answers." -- Pablo Picasso
>

--

Regards

Matthias Gresz :-)

GreMa_at_T-online.de Received on Wed Apr 08 1998 - 07:11:28 CDT

Original text of this message

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