Oracle SQL inserts multiple rows and returns something

In Oracle, you can insert multiple rows by running a query like

INSERT ALL INTO mytable (column1, column2, column3) VALUES ('val1.1', 'val1.2', 'val1.3') INTO mytable (column1, column2, column3) VALUES ('val2.1', 'val2.2', 'val2.3') INTO mytable (column1, column2, column3) VALUES ('val3.1', 'val3.2', 'val3.3') SELECT * FROM dual; 

And with a prepared statement, making one insert like this

 BEGIN INSERT INTO mytable (column1, column2, column3) VALUES (null, 'val1.2', 'val1.3') RETURNING column1 INTO ?; END; 

will return column1 (suppose the trigger assigns a value to it before insertion).

Is there a way, if possible, to combine both? A value by inserting multiple values ​​while maintaining all the values ​​of column1 (result set) with a single query?

+4
source share
1 answer

From the documentation (at least version 10g), one of the limitations for a refund offer:

You cannot specify return_clause for multi-user insert.

+2
source

All Articles