Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: DBMS_SQL.LAST_ROW_ID Function
In article <6m67g6$m0c$1_at_nnrp1.dejanews.com>, <larionov_at_yahoo.com> wrote:
>Dear members of NG,
>
>I am writing a procedure where I insert a row and I need to know immediately
>where I inserted it. So, I found the function DBMS_SQL.LAST_ROW_ID which
>returns the rowid of the last row processed.
>
>I have a question about this function. Does it returns the last rowid
>for the current transaction, or the current session, or the current schema
>or for this instance? Is it transaction safe? Do I need to use
>some other functions in package DBMS_SQL or I can use LAST_ROW_ID just
>in the middle of a procedure wchoch contains no other functions
>from DBMS_SQL package?
>
>Somebody had some negative experience using this function?
I use it successfully, but following a DBMS_SQL.Parse then DBMS_SQL.Execute. Why not just try it and see if it works in your situation? Received on Fri Jun 19 1998 - 00:59:22 CDT