0

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?

1 Answer 1

1

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.