Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Q: INSERT, UPDATE and how to catch rowid
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>...Received on Tue Sep 30 1997 - 00:00:00 CDT
> 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
>
![]() |
![]() |