我得到了ORA-00936:缺少表情。这是为什么?有人可以帮我吗?

时间:2017-06-08 19:53:34

标签: sql oracle

INSERT ALL
INTO EMPLOYEE 
(EMPL_CODE_ID, EMPL_FIRST_NAME, EMPL_LAST_NAME, EMPL_ADDRESS, 
EMPL_WORKING_AREA, EMPL_TITLE, EMPL_PHONE_NUMBER, EMPL_DOB, 
EMPL_STATE, EMPL_COUNTRY)
VALUES
('A4','ROB','BOB','123 TREE TOP','FRONT DESK','RECEPTIONIST','301-000-0004','01/04/1994','MD','USA')

INTO EMPLOYEE 
(EMPL_CODE_ID, EMPL_FIRST_NAME, EMPL_LAST_NAME, EMPL_ADDRESS, 
EMPL_WORKING_AREA, EMPL_TITLE, EMPL_PHONE_NUMBER, EMPL_DOB, 
EMPL_STATE, EMPL_COUNTRY)
VALUES
('A5','JOSH','FROG','125 TREE BARK LANE','FRONT DESK','RECEPTIONIST','301-000-0005','08/09/1994','VA','USA')
INTO EMPLOYEE 
(EMPL_CODE_ID, EMPL_FIRST_NAME, EMPL_LAST_NAME, EMPL_ADDRESS, 
EMPL_WORKING_AREA, EMPL_TITLE, EMPL_PHONE_NUMBER, EMPL_DOB, 
EMPL_STATE, EMPL_COUNTRY)
VALUES
INTO EMPLOYEE 
(EMPL_CODE_ID, EMPL_FIRST_NAME, EMPL_LAST_NAME, EMPL_ADDRESS, 
EMPL_WORKING_AREA, EMPL_TITLE, EMPL_PHONE_NUMBER, EMPL_DOB, 
EMPL_STATE, EMPL_COUNTRY)
VALUES
INTO EMPLOYEE 
(EMPL_CODE_ID, EMPL_FIRST_NAME, EMPL_LAST_NAME, EMPL_ADDRESS, 
EMPL_WORKING_AREA, EMPL_TITLE, EMPL_PHONE_NUMBER, EMPL_DOB, 
EMPL_STATE, EMPL_COUNTRY)
VALUES 
('A6','FRED','KIM','123 SENECA WAY','FRONT DESK','RECEPTIONIST','301-000-0006','03/23/1997','VA','USA')
SELECT * FROM DUAL;

2 个答案:

答案 0 :(得分:2)

我认为问题在于您在第三次和第四次“INTO EMPLOYEE”声明中缺少价值观。

答案 1 :(得分:0)

将记录插入单个表的最简单方法是直截了当INSERT INTO ... SELECT FROM。使用UNION ALL创建一组记录:

INSERT INTO EMPLOYEE 
(EMPL_CODE_ID, EMPL_FIRST_NAME, EMPL_LAST_NAME, EMPL_ADDRESS, EMPL_WORKING_AREA, EMPL_TITLE, EMPL_PHONE_NUMBER, EMPL_DOB, EMPL_STATE, EMPL_COUNTRY)
select 'A4','ROB','BOB','123 TREE TOP','FRONT DESK','RECEPTIONIST','301-000-0004','01/04/1994','MD','USA'
from dual union all
select 'A5','JOSH','FROG','125 TREE BARK LANE','FRONT DESK','RECEPTIONIST','301-000-0005','08/09/1994','VA','USA'
from dual union all
select 'A6','FRED','KIM','123 SENECA WAY','FRONT DESK','RECEPTIONIST','301-000-0006','03/23/1997','VA','USA'
from dual 
/