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: bors <bors_at_park.ru>
Date: 1997/05/11
Message-ID: <01bc5dff$666e9ca0$643fd1c3@bors>#1/1

-- 

Chrysalis <cellis_at_iol.ie> wrote in article <33722487.78FA_at_iol.ie>...

> Another possibility which speeds up the retrieval is to have an
> on-insert trigger which *updates* a single row in another table with the
> primary key of the inserted row.
>
> Retieving the latest row then requires a single row access plus a single
> primary-key indexed access to the main table.
>
> However, this falls down if there is heavy insert activity by a number
> of concurrnt users because of contention on the updated single row,
> Useful in some circumstances, however,
>
> Hope this helps.
>
> Chrysalis.
I suppose that some source table modifications are must be made. You just add column such D_WHEN, and trigger on INSERT, UPDATE which must set D_WHEN= SYSDATE. Best wishes Bors
Received on Sun May 11 1997 - 00:00:00 CDT

Original text of this message

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