Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

multiple insertions with in a single insert statement

514933Mar 12 2008 — edited Mar 12 2008
Hi all,

I need to insert multiple records in to a single statement from Java. Till now i'm using Batch execution. I tried to insert multiple rows with in a single insert statement but failed.

i'm using oracle 9.2

i tried in the following syntaxes,
insert into my_table (col1,col2) values (1,1), (2,2);
insert into my_table (col1,col2) select (1,1) union all select (2,2);

later i found that, 1st syntax is for MySQL
and 2nd is for SQLServer.

these 2 are not working in Oracle.
help me how to get this.

Thanks in advance.

Regads
PavanKumarGupta P
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 9 2008
Added on Mar 12 2008
3 comments
556 views