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

Home -> Community -> Usenet -> c.d.o.server -> Re: Getting the identity of the row just inserted

Re: Getting the identity of the row just inserted

From: Janek A. <anisimowicz_at_poczta.onet.pl>
Date: Thu, 15 Mar 2001 17:20:40 +0100
Message-ID: <98qq4k$ect$1@sunsite.icm.edu.pl>

I think that this must be like that:
 DECLARE
   v_variable number(5)
 BEGIN
   SELECT your_sequence.next INTO v_variable FROM DUAL;

   insert into your_table values
     (v_variable, ...);

   do want you want to do with v_variable;  END; Uzytkownik "Kathinka Diehl" <kathinka_at_rrr.de> napisal w wiadomosci news:m7i1bt4d2rhfnopm190rrgc3rvdl3k6aeg_at_4ax.com...
> Einar Magnus Råberg <einarmr_at_tihlde.org> wrote:
>
> > OK, I'm using Oracle 7.
> >
> > Could you give me som examples?
>
> DECLARE
> v_variable number(5)
> BEGIN
> v_variable := your_sequence.next;
>
> insert into your_table values
> (v_variable, ...);
>
> do want you want to do with v_variable;
> END;
>
> Regards, Kathinka
>
> --
> Oracle 7.3.4.5 * MS SQLServer 7 * Access2000 * Windows NT * sigh
Received on Thu Mar 15 2001 - 10:20:40 CST

Original text of this message

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