i have table a
create table a (sno number(10));
create sequence test
start with 1
increment by 1
nocycle
nocache;
insert into a (sno) values(test.nextval);
I have executed the above insert statement 1000 times.
now
select max(sno) from a;
max(sno)
---------
1000
if I use the test sequence I need to insert the values like 1050, 1100,1150,
what should be the sequence modification for this.
Please let us know if any concerns.
thanks in advance.
Regards,
T.Bhogeswara Prasad.
So you want to modify it so each call to the sequence jumps 50 values?
If so, just change the increment by to 50:
create table a (sno number(10));
create sequence test start with 999
increment by 1 nocycle nocache;
insert into a (sno) values(test.nextval);
insert into a (sno) values(test.nextval);
alter sequence test increment by 50;
insert into a (sno) values(test.nextval);
insert into a (sno) values(test.nextval);
insert into a (sno) values(test.nextval);
select * from a;
SNO
----------
999
1000
1050
1100
1150