Oracle Sql Developer错误:SQL命令未正确结束

时间:2018-06-02 04:23:46

标签: sql oracle

我一直试图弄清楚这个陈述有什么问题,现在大约两个小时,但是一直有同样的错误。有什么想法吗?

  

SQL命令未正确结束错误:检查编译器日志

CREATE OR REPLACE PROCEDURE create_Customer
          (CUSTOMER_ID IN CUSTOMER.CUSTOMERID%TYPE,
         FIRST_NAME IN CUSTOMER.FIRSTNAME%TYPE,
         LAST_NAME IN CUSTOMER.FIRSTNAME%TYPE,
         COMPANY_CHANGE IN CUSTOMER.COMPANY%TYPE DEFAULT NULL,
         ADDRESS_CHANGE IN CUSTOMER.ADDRESS%TYPE DEFAULT NULL,
         CITY_CHANGE IN CUSTOMER.CITY%TYPE DEFAULT NULL,
         STATE_CHANGE IN CUSTOMER.STATE%TYPE DEFAULT NULL,
         COUNTRY_CHANGE IN CUSTOMER.COUNTRY%TYPE DEFAULT NULL,
         POSTAL_CODE IN CUSTOMER.POSTALCODE%TYPE DEFAULT NULL,
         PHONE_CHANGE IN CUSTOMER.PHONE%TYPE DEFAULT NULL,
         FAX_CHANGE IN CUSTOMER.FAX%TYPE DEFAULT NULL,
         EMAIL_CHANGE IN CUSTOMER.EMAIL%TYPE,
         SUPPORTREPID_CHANGE IN CUSTOMER.SUPPORTREPID%TYPE DEFAULT NULL)
  IS
  BEGIN
         INSERT INTO CUSTOMER
         VALUES CUSTOMERID = CUSTOMER_ID, FIRSTNAME = FIRST_NAME, LASTNAME = 
         LAST_NAME, COMPANY = COMPANY_CHANGE,
         ADDRESS = ADDRESS_CHANGE, CITY = CITY_CHANGE, STATE = STATE_CHANGE, 
         COUNTRY = COUNTRY_CHANGE, POSTALCODE = POSTAL_CODE, PHONE = 
         PHONE_CHANGE, FAX = FAX_CHANGE, EMAIL = EMAIL_CHANGE, SUPPORTREPID 
         = SUPPORTREPID_CHANGE;
COMMIT;
END;
/ 

1 个答案:

答案 0 :(得分:0)

我认为你的insert语句有错误的语法。请查看手册中的示例:https://docs.oracle.com/database/121/SQLRF/statements_9015.htm#i2163698

此示例可能接近您想要的内容:

INSERT INTO employees (employee_id, last_name, email, 
                       hire_date, job_id, salary, commission_pct) 
               VALUES (207, 'Gregory', 'pgregory@example.com', 
                       sysdate, 'PU_CLERK', 1.2E3, NULL);