Oracle PL/SQL Tutorial/Sequences/Alter Sequence — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
(нет различий)
|
Текущая версия на 10:06, 26 мая 2010
Altering an existing sequence
SQL>
SQL>
SQL> CREATE SEQUENCE test_seq;
Sequence created.
SQL>
SQL> SELECT test_seq.nextval FROM DUAL;
NEXTVAL
----------
1
SQL> SELECT test_seq.nextval FROM DUAL;
NEXTVAL
----------
2
SQL> SELECT test_seq.nextval FROM DUAL;
NEXTVAL
----------
3
SQL>
SQL>
SQL> ALTER SEQUENCE test_seq MAXVALUE 10;
Sequence altered.
SQL>
SQL> SELECT test_seq.nextval FROM DUAL;
NEXTVAL
----------
4
SQL> SELECT test_seq.nextval FROM DUAL;
NEXTVAL
----------
5
SQL> SELECT test_seq.nextval FROM DUAL;
NEXTVAL
----------
6
SQL> SELECT test_seq.nextval FROM DUAL;
NEXTVAL
----------
7
SQL> SELECT test_seq.nextval FROM DUAL;
NEXTVAL
----------
8
SQL> SELECT test_seq.nextval FROM DUAL;
NEXTVAL
----------
9
SQL>
SQL>
SQL>
SQL> DROP SEQUENCE test_seq;
Sequence dropped.
SQL>