Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: ALTERing a sequence's min value
> No because you can't alter a sequence's minvalue
You can alter a sequence's minvalue. See the example below.
SQL> CREATE SEQUENCE testseq START WITH 10 INCREMENT BY -1 2 MINVALUE 9 MAXVALUE 100; Sequence created.
SQL> SELECT testseq.nextval FROM DUAL;
NEXTVAL
10
SQL> SELECT testseq.nextval FROM DUAL;
NEXTVAL
9
SQL> SELECT testseq.nextval FROM DUAL;
SELECT testseq.nextval FROM DUAL
*
ERROR at line 1:
ORA-08004: sequence TESTSEQ.NEXTVAL goes below MINVALUE and cannot be
instantiated
REQ SQL> ALTER SEQUENCE testseq MINVALUE 0;
Sequence altered.
REQ SQL> SELECT testseq.nextval FROM DUAL;
NEXTVAL
8
HTH,
Brian
-- ======================================== Brian Peasland Raytheons Systems at USGS EROS Data Center These opinions are my own and do not necessarily reflect the opinions of my company! ========================================Received on Mon May 22 2000 - 00:00:00 CDT