Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: A simple question, I hope
Jonathan,
Before I posted the question, I messed around with a PL/SQL function or procedure, but couldn't get it to work. I was hoping someone had done something like this already.
Thanks,
Darryl
"Jonathan Lewis" <jonathan_at_jlcomp.demon.co.uk> wrote in message
news:991988216.7918.0.nnrp-14.9e984b29_at_news.demon.co.uk...
>
> It sounds like you need to look at the 'returning' clause:
>
> insert into tableX values ...
> returning ID into {local variable}
>
>
>
> --
> Jonathan Lewis
> Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk
>
> Practical Oracle 8i: Building Efficient Databases
> Publishers: Addison-Wesley
>
> Reviews at: http://www.jlcomp.demon.co.uk/book_rev.html
>
>
>
> Darryl wrote in message ...
> >How do I get the trigger-generated ID number for the row I just added to
a
> >table? I can't do a SELECT MAX(ID) because it's a high transaction
system.
> >
> >Thanks,
> >Darryl
> >
> >
>
>
>
Received on Sat Jun 09 2001 - 17:11:12 CDT
![]() |
![]() |