Press "Enter" to skip to content

Oracle Insert Into Statement Examples

Example is given below for insert into statement of Oracle. To be able to insert rows into a table, you must either own the table in your schema or you must have insert privilege on the table. The format for a typical insert would be:

Insert into <table-expression> <column-list>
     values (<values>)

Example
Insert into scott.emp (empno, ename, sal)
   values (100, ‘John’, 589.90);

You can also use Select statement to populate one table from another table.

Example
insert into hr.employees
(employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary,
commission_pct, manager_id, department_id)
select 210, first_name, last_name, email, phone_number, sysdate, ‘IT_PROG’, 3500,
NULL, 103, 60
from hr.candidates
where first_name = ‘Susan’
and last_name = ‘Jones’;

You can also insert into multiple tables with a single insert statement.

Example
Insert First
   when comm >= 1000 then
     into high_comm
   when comm < 1000 then
     into other_comm
   else
     into no_comm
 Select empno, ename, comm
  from emp;

See also: Oracle Update Statement Examples


Insert Statement Examples

Reviewed by Marian Simpson on

Mar 14

Rating:
4