9. 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. 1
B. 10
C. 100
D. an error
Answer: A
该问题答案是A,但是我实验后应该是A,截图如下:
但是在论坛中有人说答案应该是A 因为创建序列的时候没有指定minvalue 所以序列使用minvalue默认值为1 所以当达到最大值200重新开始循环时,是从1开始的而不是根据start with 100开始的http://www.itpub.net/thread-1183897-1-1.html,并且经他人测试后答案也是A。这是为什么呢?我的库是10G的啊。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26430605/viewspace-714641/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/26430605/viewspace-714641/