Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: "insert or update" in one step?
the only way to an "update/insert" in a single call to the database is to use a pl/sql block (either anonymous or stored will work)
you've got the idea though... select "for update" the row by key value. if found, update it, if not found, then insert.
HTH
"Todd" <gdulli_at_zdnetmail.edu> wrote in message
news:3b159f56$0$1877_at_news.denver1.Level3.net...
> Is there a way to do an "insert or update" statement in one step? i.e.
I
> want to insert a certain row if it's not there, or else just update it,
without
> doing a select first and then branching to either an insert or update.
>
> Thanks! - Todd (gdulli_at_zdnetmail.edu - change edu to com)
>
>
>
Received on Wed May 30 2001 - 21:02:26 CDT