Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Add support for multi row INSERT

Lukas EderJul 11 2016 — edited May 7 2020

For quick multi row INSERTs (bulk inserts), it would be very useful to be able to supply multiple rows to the VALUES() constructor (see also )

INSERT INTO my_table (col1, col2)

VALUES (1, 'a'),

       (2, 'b');

The above would do exactly the same thing as the much more verbose

INSERT INTO my_table (col1, col2)

SELECT 1, 'a' FROM dual

UNION ALL

SELECT 2, 'b' FROM dual

Another workaround might be to resort to using PL/SQL's FORALL.

Many other databases already support this form of INSERT statement.

Marked as a duplicate of

Comments

Post Details

Added on Jul 11 2016
14 comments
2,461 views