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: Insert/update with one command

Re: Insert/update with one command

From: Holger Baer <holger.baer_at_science-computing.de>
Date: Tue, 30 Nov 2004 14:59:41 +0100
Message-ID: <cohucd$ib7$1@news.BelWue.DE>


Anton Dischner wrote:
> Hi,
>
> i believe with some release of Oracle there was intruduced a command
> which combines insert/update of data into a table.
>
> What we do is:
>
> insert into ...
> if data exists -> failure -> use update command.
>
> what we are looking for is
> insert/update table ...
> if unique key -> update
> else insert
>
> Any ideas?
>
> Toni

You are looking for the merge command which was introduced in 9i. Details and caveats can be found at the usual locations:

http://tahiti.oracle.com
http://asktom.oracle.com

HTH
Holger Received on Tue Nov 30 2004 - 07:59:41 CST

Original text of this message

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