Hi All,
Is it possible in oracle to insert multiple rows in a single insert query, as is possible in sql server:
insert into test_table values ('abc', 'xyz'), ('mno', 'pqr');
This syntax is not supported in oracle. Is oracle having any alternative for this one.
Thanks & happy new year in advance.
10 18381
try to use bulk insert using PL / SQL
try to use bulk insert using PL / SQL
Hi debashisdas,
Thanks for your reply. I know that can be done by PL/SQL, but in that case there will be multiple insert queries. I was wondering if there is any alternative in oracle for Multiple rows insertion specifically with single insert query.
Thanks.
The syntax you are asking about is not supported in Oracle.
The kind of syntax you are asking in SQL Server is not suppoerted in Oracle.
Thanks for your replies.
Hi All,
Is it possible in oracle to insert multiple rows in a single insert query, as is possible in sql server:
insert into test_table values ('abc', 'xyz'), ('mno', 'pqr');
This syntax is not supported in oracle. Is oracle having any alternative for this one.
Thanks & happy new year in advance.
Multiple rows can be inserted using only one insert statement only when you have got the data available in some other table in the database. In that case you can use following query: - insert into table1
-
select * from table2
assuming that the structures of table1 and table2 are the same.
Multiple rows can be inserted using only one insert statement only when you have got the data available in some other table in the database. In that case you can use following query: - insert into table1
-
select * from table2
assuming that the structures of table1 and table2 are the same.
yes that is one option ,but the user was not certainly asking about that.
Use triggers for insert or write PL/SQL for multiple insertition.
hi dear
if u want to insert the multiple values with single insert statement
then try this
insert into tablename values('&column1',&column2,.......);
actually column1 is in quotes because it is varchar or char
for number use the simple like column2
for date field u have to use like column1
on execution of statement it will ask to enter the values untill u will enter.
i hope it will help u.
Yes. It is possible in Oracle.
Follow the query like
insert all
into table1 values(.,.,),
into table2 values(.,.,),
into table3 values(.,.,),
...
..
select * from dual;
If u want to insert into same table multiple row, keep the tablename same in the above query. thats it.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Eric Kincl |
last post by:
Hello,
I have an array of data in PHP. I would like to insert each member of the
array into it's own row in SQL. The array is of variable length, so it
would have to be dynamic code. How would...
|
by: Sans Spam |
last post by:
Greetings! I have a table that contains all of the function
permissions within a given application. These functions are different
sections of a site and each has its own permissions (READ, WRITE,...
|
by: gregory.sharrow |
last post by:
I need to secure a datawarehouse table at the row level based on 1 to
many keys on that table. A user should only see the rows they have
access to. I need to be able to figure out which rows they...
|
by: Robert Brown |
last post by:
Hi All.
I have a routine that checks a SQL Table for all records 3 months
prior to a predetermined date, then I insert them into an Archive DB
then delete those records from the original table....
|
by: serge |
last post by:
How can I run a single SP by asking multiple sales question either
by using the logical operator AND for all the questions; or using
the logical operator OR for all the questions. So it's always...
|
by: Diego |
last post by:
Hi everybody!
I'm using DB2 PE v8.2.3 for linux. I've defined a database with the
following schema:
ANNOTATION(ID,AUTHOR,TEXT)
ANNOTATION_BOOK(ANNOTATION_ID,OBJECT_ID)...
|
by: hellboss |
last post by:
Hi Every one !
I need to insert a set of values which are passed thru the parameter ,Below is the code to do the Single table insertion , Now I need to do multiple table insertion ie, to insert...
|
by: newbie |
last post by:
Dear folks,
pardon me if this is a stupid question.
For this table
---------------------------------------
| id | foo | bar |
--------------------------------------
I...
|
by: Henry J. |
last post by:
My app needs to insert thousand value rows into a mostly empty table
(data are read from a file). I can either use inserts, or use merge.
The advantage of using merge is that in the few cases...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |