Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to get back the inserted row?
On Wed, 05 Jan 2000 18:44:15 GMT, sriniv79_at_hotmail.com wrote:
>What is the best way to get the newly created row immediately after an
>insert? I am interested in getting the values of some columns filled in
>by an Insert Trigger.
In Oracle 8.0.5 and up try using the returning clause...
eg.
insert into foo ( col2, col3, col4 )
values ( 2, 3, 4 )
returning col1, col5
into l_col1, l_col5;
hope this helps.
chris.
>
>TIA.
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
--
Christopher Beck
Oracle Corporation
clbeck_at_us.oracle.com
Reston, VA.
![]() |
![]() |