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 / lova raju allumalla

WE CANNOT ALTER A SEQUENCE START NUMBER BUT IF U WANT TO
CHANGE THE EXISTING DATA IN THE TABLE THEN

ASSUME U HAVE EMPLOYEE TABLE WHERE EMPNO BEGINS WITH 100


UPDATE EMPLOYEE SET EMPNO = EMPNO + 1 WHERE EMPNO IN
(SELECT EMPNO FROM EMPLOYEE);

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to start mysql server? : Sql dba

1279


How do I remove duplicates in two columns?

1202


how to escape special characters in sql statements? : Sql dba

1124


Do we need to rebuild index after truncate?

1154


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

1252


what are all the common sql function? : Sql dba

1141


Can delete statement be rollbacked?

1065


what is collation? : Sql dba

1242


how many tables will create when we create table, what are they? : Sql dba

1156


What is your daily office routine?

2353


Is primary key clustered index?

1028


Can we use distinct and group by together?

1147


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

2102


Does group by remove duplicates?

1120


what are aggregate and scalar functions? : Sql dba

1142