There is a sequence with min value 100.
I want to alter this sequence to min value as 101.
If the table has already data in the sequence column as
100,101,102...
Is it possible to do so ?

Answer Posted / pradeep

Or other way around can be rename the current sequence and
create new sequence with the desired values;

SQL> CREATE SEQUENCE SEQ_TET INCREMENT BY 1 START WITH 100
MAXVALUE 1000000 MINVALUE 99;

Sequence created.

SQL> rename SEQ_TET to seq_test;

Table renamed.


SQL> select * from user_sequences;

SEQUENCE_NAME MIN_VALUE MAX_VALUE
INCREMENT_BY C O CACHE_SIZE
------------------------------ ---------- ---------- -------
----- - - ----------
LAST_NUMBER
-----------
SEQ_TEST 99
1000000 1 N N 20
100

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I partition a table in sql?

728


What is sqlexception in java?

728


Is sql scripting language?

724


What are different joins used in sql?

722


How to add new employee details in an employee_details table with the following details

821






how to return query output in html format? : Sql dba

847


What are the disadvantages of file system?

819


What is consistency?

884


What are pl sql data types?

724


Is pl sql and postgresql same?

767


What is cartesian join in sql?

742


Is sql procedural language?

733


What is dense_rank in sql?

691


what is the difference between char and varchar data types? : Sql dba

738


What is left join in postgresql?

745