Hi Dave,
There is a tricky solution to this. Use the following pattern of the
query:
INSERT ALL
INTO table_name (column1, column2)
VALUES (this_value, that_value)
INTO table_name (column1, column2)
VALUES (this_value, that_value)
INTO table_name (column1, column2)
VALUES (this_value, that_value)
-------------
-------------
-------------
INTO table_name (column1, column2)
VALUES (this_value, that_value)
SELECT NULL FROM dual;
Thanks & Regards,
Manash Pratim Baruah | Tech Mahindra Ltd.
Sharda Centre, Off Karve Road, Pune - 411004, India.
www.techmahindra.com
-----Original Message-----
From: Dave
[mailto:oracledba-ezmlmshield-x64263233.[Email address protected]
Sent: Tuesday, October 09, 2007 5:17 AM
To: LazyDBA Discussion
Subject: Creating multiple rows at once
This one will be easy for you guys.
How do I insert a bunch of data all at once?
Instead of this:
INSERT INTO table name
VALUES ('value this', 'value that');
[and then do it again for the next row]
INSERT INTO table name
VALUES ('value this', 'value that');
How do I just keep going before executing?
Like this:
INSERT INTO table name
VALUES ('value this', 'value that') ('value this', 'value that')
('value this', 'value that') ('value this', 'value that')
('value this', 'value that');
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
============================================================================================================================
Disclaimer:
This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at <a href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a> externally and <a href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.com/Disclaimer.html</a> internally within Tech Mahindra.
============================================================================================================================
Oracle LazyDBA home page