multiple insertions with in a single insert statement
514933Mar 12 2008 — edited Mar 12 2008Hi 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