oracle insert multiple rows into same table 1

oracle insert multiple rows into same table

INSERT INTO my_table (col1, col2)
SELECT 8000, 0 FROM DUAL
UNION ALL
SELECT 8001, 5 FROM DUAL;

Here is what the above code is Doing:
1. Create a table called my_table with two columns, col1 and col2.
2. Insert two rows into the table.
3. Select the rows from the table.
4. Update the second row.
5. Insert two more rows into the table.
6. Select the rows from the table.

Similar Posts