Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Q: INSERT, UPDATE and how to catch rowid
Hello Thomas,
Are you sure about the second "we" in "We can get the rowid of the last row we inserted (updated) into the table"?
I was afraid that I could get the rowid of someone else's insert, if it occurred between mine and the retrieval of the package variable.
-- Kind reGards, Gerard (ghp_at_santens.be; ghp_at_skynet.be) Thomas Kyte <tkyte_at_us.oracle.com> schreef in artikel <34361a91.7606767_at_newshost>...Received on Tue Sep 30 1997 - 00:00:00 CDT
> On 30 Sep 1997 09:15:36 GMT, "Gerard H. Pille" <ghp_at_santens.be> wrote:
>
> >But how would this trigger then pass the new rowid to the program that
made
> >the insert?
> --
>
> We can get the rowid of the last row we inserted (updated) into the table
> quite easily...
>
> try the following script, the concept is, we will use a package to
maintain a
> state; a trigger to populate the state. An after insert for each row
trigger
> can push the rowid of the newly inserted row into a package variable for
us. We
> can read the package variable and use it:
![]() |
![]() |