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 multiple

Re: insert multiple

From: Richard Foote <richard.foote_at_bigpond.com>
Date: Fri, 19 Jul 2002 23:32:53 +1000
Message-ID: <drUZ8.38690$Hj3.116873@newsfeeds.bigpond.com>


Forgot to include the subquery in the multitable inserts examples. They determine which rows (or number of rows) you want inserted.

Richard
"Richard Foote" <richard.foote_at_bigpond.com> wrote in message news:h5UZ8.38684$Hj3.116886_at_newsfeeds.bigpond.com...
> Assuming you mean Oracle and not DB2, you can either:
>
> insert with a subquery rather than a values clause or
>
> with 9i you can use the multitable insert syntax
>
> 'INSERT ALL INTO bowie VALUES ('Ziggy',... ) INTO bowie VALUES ('Major
> Tom',...) into bowie ...'
>
> or
>
> INSERT ALL WHEN condition_1_true THEN INTO bowie VALUES ('Ziggy',..) when
> condition_2_true THEN INTO bowie VALUES ('Major Tom', ...
>
> to give some examples.
>
> If you mean DB2 I would have to dig out my old DB2 version 3 and 4 manuals
> (although I'd rather not as I'm allergic to dust :)
>
> If you know a bit about DB2, perhaps you can answer me this question. When
> are IBM going to bite the bullet and come out with DB3 :)
>
> Regards
>
> Richard
>
> "trigger" <member_at_mainframeforum.com> wrote in message
> news:3d38047c$1_5_at_news5.nntpserver.com...
> > How do I insert multiple records into a DB2 table using a single
> > Insert query?
> >
> >
> >
> > --
> > www.MainFrameForum.com - USENET Gateway
>
>
Received on Fri Jul 19 2002 - 08:32:53 CDT

Original text of this message

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