Home » SQL & PL/SQL » SQL & PL/SQL » Multiple Rows
Multiple Rows [message #22169] Thu, 26 September 2002 12:43 Go to next message
ramesh
Messages: 123
Registered: August 2000
Senior Member
Hi All
Can we insert multiple rows at a time? I have a table which has no data. I have to insert 10 rows at a time. How? How many rows can i insert at a time?

Thanks
Ramesh
Re: Multiple Rows [message #22171 is a reply to message #22169] Thu, 26 September 2002 14:03 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
If the data is coming _from_ another table, you can use the INSERT INTO/SELECT FROM syntax:

insert into t1
  select * from t2;


If you are just talking about scalar inserts, you need to do them one at a time unless you use some convoluted process like:

insert into t
  select :r1v1, :r1v2 from dual
  union all
  select :r2v1, :r2v2 from dual;


where r1v1 is row 1, value1. I would not recommend this approach however.
Previous Topic: if EXISTS (select ...
Next Topic: PL/SQL Arrays Nested tables
Goto Forum:
  


Current Time: Mon Apr 29 00:21:56 CDT 2024