adspace


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

Is primary key clustered index?

1026


If a cursor is open, how can we find in a pl/sql block?

1251


what is dbms? : Sql dba

1069


What is the current version of postgresql?

1188


How do I remove duplicates in two columns?

1201


Can we use distinct and group by together?

1146


Can we rollback truncate?

1082


Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me

2099


What is the current version of sql?

1106


what is sql server agent? : Sql dba

1188


how to use regular expression in pattern match conditions? : Sql dba

1125


What is your daily office routine?

2351


Does group by remove duplicates?

1120


Do we need to rebuild index after truncate?

1151


what is bcp? When does it used? : Sql dba

1065