Re: INSERT or UPDATE

From: Rozi & George Goldberger <ghita_at_worldnet.att.net>
Date: Wed, 28 Feb 2001 19:56:26 GMT
Message-ID: <KJcn6.383$jP.71176_at_typhoon2.ba-dsg.net>


Sorry, there is nothing like it in Oracle. You can write a procedure to do the thing.

George

"Try Out" <kasse_at_kutte.dk> wrote in message news:lkpp9t08gmgcmkf0lu4olo6li11rtobca4_at_4ax.com...
> I need a command that works like REPLACE does on MySQL (definition
> folows). What is the equevalent on oracle?
>
> -- Troels
>
>
> REPLACE [LOW_PRIORITY | DELAYED]
> [INTO] tbl_name [(col_name,...)]
> VALUES (expression,...)
> or REPLACE [LOW_PRIORITY | DELAYED]
> [INTO] tbl_name [(col_name,...)]
> SELECT ...
> or REPLACE [LOW_PRIORITY | DELAYED]
> [INTO] tbl_name
> SET col_name=expression, col_name=expression,...
>
> REPLACE works exactly like INSERT, except that if an old record in the
> table has the same value as a new record on a unique index, the old
> record is deleted before the new record is inserted
>
Received on Wed Feb 28 2001 - 20:56:26 CET

Original text of this message