Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Does Oracle Allow Retrieval of Parsed Insert Statement??
Half-solved:
We have discovered that a "returning" clause can be added after the "values" clause in the INSERT statement to return a rowid immediately after a row is inserted.
However, it would still be helpful to have a procedure or Oracle OCI call to Parse a sql statement. In case anybody can help out...
Thanks,
Sam.
> -----Original Message-----
> From: Sam Bootsma
> Sent: January 31, 2001 1:33 PM
> To: 'ORACLE-L_at_fatcity.com'
> Subject: Does Oracle Allow Retrieval of Parsed Insert Statement??
>
> We have a situation where we insert rows into a table, without having
> knowledge of the primary key. One of our developers needs to determine
> the rowid of such a row (primary key unknown) immediately after the row is
> inserted into the table.
>
> Does anybody know if the rowid can be retrieved (or somehow returned)
> immediately after the row is inserted (without requerying the table)?
>
> The rowid can also be determined by parsing the insert statement,
> retrieving the primary key, then querying the table for the rowid of the
> row. Does anybody know if Oracle has an OCI call that returns components
> of a parsed SQL INSERT statement. Or does anybody have a script or
> procedure that parses a SQL INSERT statement?
>
> Thanks for any help.
Received on Wed Jan 31 2001 - 13:10:32 CST