Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Get the RowID of the last insert
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
![]() |
![]() |