43.Evaluate the following CREATE SEQUENCE statement:
CREATE SEQUENCE seq1
START WITH 100
INCREMENT BY 10
MAXVALUE 200
CYCLE
NOCACHE;
The SEQ1 sequence 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 err
答案:A
解析:这里创建了一个序列,增量为10,最大为200,开始为100,循环,不缓存,
如果达到最大值的时候,如果没有指定最小值,那么会从1开始,如果指定的话,会从最小值开始
CREATE SEQUENCE seq1
START WITH 100
INCREMENT BY 10
MAXVALUE 200
CYCLE
NOCACHE;
The SEQ1 sequence 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 err
答案:A
解析:这里创建了一个序列,增量为10,最大为200,开始为100,循环,不缓存,
如果达到最大值的时候,如果没有指定最小值,那么会从1开始,如果指定的话,会从最小值开始