Evaluate the following CREATE SEQUENCE statement:
CREATE SEQUENCE seql
START WITH 100
INCREMENT BY 10
MAXVALUE 200
CYCLE
NOCACHE;
The sequence SEQ1 has generated numbers up to the maximum limit of 200. You issue the
following SQL statement:
SELECT seql.nextval FROM dual;
What is displayed by the SELECT statement?
A.
1
B.
10
C.
100
D.
an error
Wouldn’t it be 100? This answer seems to be wrong
The correct answer is A. The reason is there is no definition for MINVALUE then the default is 1. And counter for cyclic sequences jumps to the MINVALUE, not to START WITH