The Oracle INSERT statement is used to add new rows of data into a table. The basic syntax is:
sql
INSERT INTO table_name (column1, column2, …) VALUES (value1, value2, …);
- Single Row Insert: Inserts one row at a time with specific column values.
Multi-Row Insert: Inserts multiple rows using a SELECT statement.
Example:sql
INSERT INTO employees (id, name, salary)
SELECT id, name, salary FROM temp_employees;
You can also insert default or null values by skipping columns in the column list or explicitly using NULL. Use RETURNINGto retrieve values generated during the insert.