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
how to start mysql server? : Sql dba
How do I remove duplicates in two columns?
how to escape special characters in sql statements? : Sql dba
Do we need to rebuild index after truncate?
If a cursor is open, how can we find in a pl/sql block?
what are all the common sql function? : Sql dba
Can delete statement be rollbacked?
what is collation? : Sql dba
how many tables will create when we create table, what are they? : Sql dba
What is your daily office routine?
Is primary key clustered index?
Can we use distinct and group by together?
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
Does group by remove duplicates?
what are aggregate and scalar functions? : Sql dba