Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: get id after insert
That would do in a one-user enviorment but not in a multiuser.. since
someone could do a new insert and then i would not get the number from
my insert.
Regards
Roland
In article <38605B79.976FA232_at_cig.nml.mot.com>,
Troy Tinnes <q10641_at_cig.nml.mot.com> wrote:
> Is the ID sequence generated? If so, you can do this:
>
> SELECT id.CURRVAL
> FROM dual;
>
> - Troy
>
> buurd_at_my-deja.com wrote:
>
> > Hi!
> > I'd often have to get the id (triggergenerated) from a table for the
> > row i just inserted. I'd hope there is a better solution than asking
> > for the max(id).
> >
> > Tia
> >
> > --
> > Roland Carlsson
> > Certified Java programmer
> > Sk=F6vde
> > Sweden
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
>
--
Roland Carlsson
Certified Java programmer
Skövde
Sweden
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Dec 22 1999 - 04:45:56 CST