Insert Multiple Rows in Oracle: INSERT ALL
In Oracle database, you can use the INSERT ALL statement to insert multiple records at once. This statement allows you to specify multiple insert operations in a single INSERT statement.
Here is an example:
INSERT ALL
INTO table_name (column1, column2) VALUES ('value1', 'value2')
INTO table_name (column1, column2) VALUES ('value3', 'value4')
INTO table_name (column1, column2) VALUES ('value5', 'value6')
SELECT * FROM dual;
In this example, we have inserted three records into the table table_name, each record containing two values. More INTO clauses can be added as needed to insert additional records.
It is important to note that if you need to insert a large amount of data at once, it is recommended to use the INSERT ALL statement, as this can reduce the burden on the database and improve insertion efficiency.