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: Get the primary key of the last record added

Re: Get the primary key of the last record added

From: Steve McDaniels <steve.mcdaniels_at_sierra.com>
Date: 1997/05/05
Message-ID: <01bc5983$5d64b480$030914ac@SteveIP.corp.sierra.com>#1/1

won't this do it?

Query A: select max(rowid) from <table>;

select <keyed field> from <table> where rowid = chartorowid(<rowid from query A>);

Christoph Geisse <Ch.Geisse_at_kfa-juelich.de> wrote in article <5jhkud$um9_at_zam201.zam.kfa-juelich.de>...
> Hi,
>
> does anybody know how to get the primary key of the last record added to
> a table? (ORACLE 7.2, SQL)
>
> Regards,
> Christoph
> -----------------------------------------------------------------------
> Von/From Christoph Geisse Forschungszentrum Juelich
> Tel./Phone (02461)61-2128 ASS-BS
> Mail Ch.Geisse_at_kfa-juelich.de D-52425 Juelich, GERMANY
>
>
Received on Mon May 05 1997 - 00:00:00 CDT

Original text of this message

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