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 RowID of the last insert

Re: Get the RowID of the last insert

From: Sam Hwang <samhng_at_gmail.com>
Date: 25 Mar 2007 23:33:22 -0700
Message-ID: <1174890802.697044.304350@p15g2000hsd.googlegroups.com>


On Mar 26, 2:35 am, "Mark D Powell" <Mark.Pow..._at_eds.com> wrote:
> On Mar 25, 12:43 am, "Ana C. Dent" <anaced..._at_hotmail.com> wrote:
>
> > "Sam Hwang" <sam..._at_gmail.com> wrote in news:1174797005.498751.181200
> > @y66g2000hsf.googlegroups.com:
>
> > > Hi,
> > > How to get the rowId of the last insert?
>
> > use RETURNING
>
> Warning - Rowid's can change. In some cases it is possible for a
> rowid to be reused within extremely tight periods of time so take care
> that the data is either retrieved using select for update or that no
> deletes take place between the fetch to get the rowid and any update
> or delete done using the rowid. In some applications it is advisible
> to verity the row fetched by rowid is the same row that was initially
> fetched (same key).
>
> The target table being an IOT or a paritioned table with row movement
> enabled should be considered in application design.
>
> Just a couple of points to keep in mind.
>
> -- Mark D Powell --

Is it RETURNING clause a proprietary statement of Oracle? If so, how to achieve the same effect in MySql or Sql Server? Received on Mon Mar 26 2007 - 01:33:22 CDT

Original text of this message

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