Multiple Inserts

All posts relating to Oracle database administration.

Moderator: Tim...

Multiple Inserts

Postby Guest » Mon Nov 01, 2004 6:09 pm

hi
can we do multiple inserts into one statement???
for example in MYSQL....we can have following syntex

insert into emp (empno,ename) values(1234,'Asif'),(1235,'Ahmed'),(1236,'Ahsan');


so we are inserting three rown in a single statement...i have studdied about the INSERT ALL statement but it can be used to extract data from one table... and inserts into another...so do we have a syntex like MYSQL has as i mentioned above
Regards
Guest
 

RE:Multiple Inserts

Postby Tim... » Mon Nov 01, 2004 6:09 pm

Hi.

Not really. You can do an INSERT INTO ... SELECT as you know, but not a single statement. For performance reasons you may decide to do a bulk bind like:

http://www.oracle-base.com/articles/9i/ ... sing9i.php

This allows the contents of a PL/SQL collection to be inserted into a table using a single statement.

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17935
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK


Return to Oracle Database Administration

Who is online

Users browsing this forum: No registered users and 7 guests