Search code examples
sqloracle-databasedatabase-sequence

Select SEQUENCE in SQL: FROM keyword not found where expected


I created a a sequence in SQL:

CREATE SEQUENCE MYSEQ increment by 5 start with 10;

When I try to select the sequence: select sequence MYSEQ.nextval from DUAL;

I get the error: ORA-00923: FROM keyword not found where expected 00923. 00000 - "FROM keyword not found where expected"

Any help would be appreciated


Solution

  • You don't need the sequence keyword:

    select MYSEQ.nextval
    from DUAL;