Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL help
On Sep 25, 9:06 am, Laura <laura.pater..._at_gmail.com> wrote:
> Hi,
>
> I hope this is the correct group to post in - any help is appreciated.
>
> I am writing some SQL to populate or update an Oracle table. I
> currently run this through JDBC, however, it will probably end up as a
> PL/SQL procedure.
>
> What I want to do is UPDATE a row if it currently exists in the
> database - however, if it doesn't already exist, I want to CREATE it
> with the new values.
>
> I'm sure this must be a fairly common thing to do - however, my
> searches for an answer have been unsuccessful... I would prefer not
> to have to run a separate query in my code to determine whether an
> update or insert is required.
>
> Thanks,
> - Laura
Also see examples at http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:5318183934935
jg
-- @home.com is bogus. http://4ping.blogspot.com/2007/09/4ping-fundas-sensory-branding.htmlReceived on Tue Sep 25 2007 - 16:15:49 CDT