Re: rowid of inserted row

From: <surya_at_usa.net>
Date: 1995/05/22
Message-ID: <3pqig1$r4r_at_earth.usa.net>#1/1


> hjelm+_at_cs.cmu.edu (Mark Hjelm) writes:
[DELETED]
 is there a direct way to
> obtain the rowid of a row I've just inserted into a table? I can
> think of several indirect ways,
>
>>>>

I don't know if the following satisfies 'DIRECT' criteria:

  1. Have a package variable that gets populated in after insert trigger on row. my_package.just_inserted_row_id := new.rowid (Let me know if this works, please.)

or

2. Query the table using the primary key of record just inserted and get the rowid.

  EXEC SQL SELECT rowid into :my_rowid ....

Ganesh Puranik,
Consultant, Surya Systems, Inc. Received on Mon May 22 1995 - 00:00:00 CEST

Original text of this message