Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 bulk collect improves performance?

944


Why truncate is faster than delete?

1052


what are date and time data types in mysql? : Sql dba

916


Show code of a cursor for loop.

999


Is oracel sql developer written in java?

1057


How can I see all tables in sql?

983


What is the difference between union and union all command?

1006


Can I copy :old and :new pseudo-records in/to an oracle stored procedure?

1138


How much does sqlite cost?

982


Can we insert in view in sql?

999


Does mysql_real_escape_string prevent sql injection?

906


Is pl sql different from sql?

931


what is the difference between truncate and delete statement? : Transact sql

1012


how to increment dates by 1 in mysql? : Sql dba

924


define sql update statement ? : Sql dba

1048