问题
create table employee (
employee_id number (5),
first_name varchar2(100),
last_name varchar2(100),
salary number (10),
department_id number(5),
hire_date date,
constraint pk_emp primary key (employee_id)
)
insert into employee (employee_id, last_name, salary )
values
(129, 'khaj', 19000),
(130, 'ravi', 20000);
enter image description here
回答1:
Wrong syntax.
Either
insert into employee (employee_id, last_name, salary)
values (129, 'khaj', 19000);
insert into employee (employee_id, last_name, salary)
values (130, 'ravi', 20000);
or
insert into employee (employee_id, last_name, salary)
select 129, 'khaj', 19000 from dual union all
select 130, 'ravi', 20000 from dual;
or even
insert all
into employee (employee_id, last_name, salary) values (129, 'khaj', 19000)
into employee (employee_id, last_name, salary) values (130, 'ravi', 20000)
select * from dual;
来源:https://stackoverflow.com/questions/59416521/inserting-multiple-rows-into-table-getting-error-ora-00933-sql-command-not-pr