INSERT ALL (Oracle)
INSERT ALL (Oracle) is a SQL statement in the DML Statements category. Oracle: inserts rows into multiple tables in a single statement. Can also use conditional INSERT ALL. The syntax is INSERT ALL INTO table1 VALUES (col1, col2) INTO table2 VALUES (col1, col2) SELECT ... FROM DUAL;. It returns rows inserted into all tables. A typical example: INSERT ALL INTO employees (id, name) VALUES (emp_id, emp_name) INTO employee_audit (action, emp_id) VALUES ('CREATED', emp_id) SELECT 101 AS emp_id, 'Alice' AS emp_name FROM DUAL; -- Creates employee record AND audit record in one statement -- Conditional: INSERT ALL WHEN salary > 80000 THEN INTO high_earners (name, salary) VALUES (name, salary) ELSE INTO regular_earners (name, salary) VALUES (name, salary) SELECT name, salary FROM employees; A close relative is INSERT INTO, which inserts new rows into a table. A close relative is UPDATE, which modifies existing rows in a table. Always use WHERE to avoid updating all rows.