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: Gerard H. Pille <ghp_at_santens.be>
Date: 1997/09/30
Message-ID: <01bccd80$c60733c0$7b1340c0@pcghp.santens.be>#1/1

But how would this trigger then pass the new rowid to the program that made the insert?

-- 
------------
Kind reGards
     \ /   |
      X    |
     / \   x
     Gerard

Borivoj Tydlitat <btydlitat_at_merlin.cz> schreef in artikel
<3429116D.65F7_at_merlin.cz>...

> 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 Tue Sep 30 1997 - 00:00:00 CDT

Original text of this message

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