Domanda

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?

È stato utile?

Soluzione

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
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top