문제

Have an error while trying to create Oracle sequence

CREATE SEQUENCE HR.order_entry_id
             AS BIGINT START WITH 1 INCREMENT BY 1;

CREATE SEQUENCE HR.USER_PROFILE_SEQ
             AS BIGINT START WITH 1 INCREMENT BY 1

Error at line 1 ORA-00933: SQL command not properly ended

Is there an issue with this create statement?

도움이 되었습니까?

해결책

First, bigint is not a data type in Oracle. Second, the create sequence DDL statement does not accept an as <<data type>> clause.

CREATE SEQUENCE hr.order_entry_id
  START WITH 1
  INCREMENT BY 1 

Since you're not overriding the default start with or increment by, you can also just do

CREATE SEQUENCE hr.order_entry_id
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top