Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: A simple question, I hope

Re: A simple question, I hope

From: Darryl <dfs_at_nospam.com>
Date: Sat, 09 Jun 2001 22:11:12 GMT
Message-ID: <4axU6.5633$c37.669041@newsread1.prod.itd.earthlink.net>

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

Original text of this message

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