Re: upsert strategies?

From: Frank van Bortel <frank.van.bortel_at_gmail.com>
Date: Wed, 12 Nov 2008 19:30:12 +0100
Message-ID: <b4c1d$491b20b5$524b5c40$22116@cache1.tilbu1.nb.home.nl>


mh_at_pixar.com wrote:
> So far, I've figured out 4 possible ways to perform upsert-like
> functionality:
>
> 1. try insert, on exception update
> 2. try update, on exception insert
> 3. delete, then insert
> 4. merge with DUAL
>
> It seems so far the nicest solution is #4.
>
> Here's some questions:
>
> - Do the other methods have any features which might recommend them?
>
> - Are there any methods that might be portable to other databases?
>
> - Are there any methods I might be overlooking?
>
> Many TIA!
> Mark
>

Search asktom.oracle.com for "upsert" - he has documented, timed examples of why you should use merge

-- 

Regards,
Frank van Bortel
Received on Wed Nov 12 2008 - 12:30:12 CST

Original text of this message