Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Q: INSERT, UPDATE and how to catch rowid

Re: Q: INSERT, UPDATE and how to catch rowid

From: Borivoj Tydlitat <btydlitat_at_merlin.cz>
Date: 1997/09/24
Message-ID: <3429116D.65F7@merlin.cz>#1/1

Starous wrote:
>
> I'm inserting a row into table using command
>
> INSERT INTO my_table
> ( column list )
> VALUES
> ( values list );
>
> After little while I will need to update this new inserted record.
> Using index is good, but I'm looking for better performance.
>
> Is there any chance to catch a rowid of the new inserted record for
> later use? ( The same problem coming with UPDATE too )

Yeah, you can get the ROWIDs in triggers FOR EACH ROW:

INSERT:   :new.ROWID                in AFTER INSERT trigger
UPDATE:   :new.ROWID and :old.ROWID in AFTER UPDATE trigger
DELETE:   :old.ROWID                in BEFORE DELETE trigger

Borek
mailto:btydlitat_at_merlin.cz Received on Wed Sep 24 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US