Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Update / Insert Stored Procedure
The best way is probably the way you suggested, create an explicit cursor
and check it. Depending on your result, do an insert or update.
Mark
steve wrote in message <7c7t1i$7p5$1_at_reader1.reader.news.ozemail.net>...
>In an SP that does an update (if the row exists) or an insert (if it doesnt
>already exist) Whats the most efficient way to check if the row exists to
>decide whether to run the insert or update routine?
>
>I need to add alot of rows in as short a time as possible. Currently I open
>a cursor to see if the row exists - but is there a better way?
>
>(A Unique key is passed in as a parameter)
>
>Thanks.
>
>
>
>
>
>
Received on Thu Mar 11 1999 - 03:33:29 CST
![]() |
![]() |