CREATE SEQUENCE issue

20 pts.
Tags:
sequence
The answer the pretest gives is A. From all definitions of CYCLE, to me it appears the correct answer is C. Please explain. Thanks. 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. 1 B. 10 C. 100 D. an error

Software/Hardware used:
Oracle 10g

Answer Wiki

Thanks. We'll let you know when a new response is added.

By default the sequence will have a minimum value of 1.  So when the sequence cycles back to the beginning it’ll go to 1 and start over.  The START WITH value is just where it starts at the first time, it isn’t the lower bound of the sequence.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    What is the MINVALUE value for that SEQUENCE? Note that START WITH determines a starting value but not necessarily a (re)CYCLE value. -- Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following