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: multiple inserts in a single sql statement

Re: multiple inserts in a single sql statement

From: tonyc <tony_x_chen_at_hotmail.com>
Date: Fri, 12 Mar 1999 17:08:52 -0500
Message-ID: <36E99074.44319652@hotmail.com>


Hi, Philippe:

Can we use the follwing code in jdbc? Thank you!

Begin

   Insert into mytable1(col1,col2,...) values (val1,val2,...);
   Insert into mytable2(col1,col2,...) values (val1,val2,...);
   Insert into mytable3(col1,col2,...) values (val1,val2,...);
   Insert into mytable4(col1,col2,...) values (val1,val2,...);
end;

kelly

Philippe wrote:

> You can send a Pl/sql block :
>
> Begin
> Insert into mytable1(col1,col2,...) values (val1,val2,...);
> Insert into mytable2(col1,col2,...) values (val1,val2,...);
> Insert into mytable3(col1,col2,...) values (val1,val2,...);
> Insert into mytable4(col1,col2,...) values (val1,val2,...);
> end;
>
> HTH
>
> Philippe
>
> rachamallu_reddy_at_my-dejanews.com wrote in message
> <7c3rna$s3a$1_at_nnrp1.dejanews.com>...
> >Hi,
> >
> >My application talks to Oracle8 via JDBC1.2. In the application, I do a lot
> of
> >inserts. Right now I have a sql statement for every insert. This means JDBC
> >calls for every insert. With this scenario, the performance is not good.
> >
> >With JDBC2.0, I can batch a set of sql statements, before sending them over
> to
> >the server.
> >
> >I don't want to use JDBC2.0 now. Until then, is there any way to send
> multiple
> >insert's as a single sql statement?
> >
> >Any insight will be really appreciated.
> >
> >thanks
> >reddy
> >
> >-----------== Posted via Deja News, The Discussion Network ==----------
> >http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Received on Fri Mar 12 1999 - 16:08:52 CST

Original text of this message

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