What is displayed by the SELECT statement?

Evaluate the following CREATE SEQUENCE statement:
CREATE SEQUENCE seq1
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 seq1.nextval FROM dual;
What is displayed by the SELECT statement?
A. 100
B. an error
C. 10
D. 1

Download Printable PDF. VALID exam to help you PASS.

6 thoughts on “What is displayed by the SELECT statement?

  1. D
    STARTS WITH used for the very first time. When sequence restart it will start with MINVALUE. Since MINVALUE is not define here it will use default MINVALUE which is 1.

  2. SQL> SELECT seq1.nextval FROM dual;

    NEXTVAL
    ———-
    200

    SQL>
    SQL> SELECT seq1.nextval FROM dual;

    NEXTVAL
    ———-
    1

    SQL>

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.