Home » SQL & PL/SQL » SQL & PL/SQL » Sequence incementation (Oracle 9.2.0.8)
Sequence incementation [message #293484] Sun, 13 January 2008 05:05 Go to next message
rogmichal
Messages: 2
Registered: December 2007
Junior Member
Hello,

I'm going to change the current value of sequence from 282 to 2000 and I'm wondering how to do this.

Is it possible(I guess so), to increment the value using:
Quote:

select seq_my_transaction.nextval from dual;

in a loop.

I've got a problem with creating loops, so if You know how to do this I would be grateful.

Cheers,
Re: Sequence incementation [message #293485 is a reply to message #293484] Sun, 13 January 2008 05:27 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:

Is it possible(I guess so), to increment the value using [...] in a loop.

Yes. But you can also modify the increment from the current value to the next one you want and just execute one nextval. Then you put back the initial increment.

Quote:

I've got a problem with creating loops

Which one? Post your code.

Regards
Michel
Re: Sequence incrementation [message #293492 is a reply to message #293485] Sun, 13 January 2008 07:36 Go to previous message
Frank Naude
Messages: 4502
Registered: April 1998
Senior Member
See example at http://www.orafaq.com/wiki/Sequence
Previous Topic: Promlem in creating user
Next Topic: Difficulty in joining two tables!
Goto Forum:
  


Current Time: Sat Dec 03 12:26:45 CST 2016

Total time taken to generate the page: 0.28155 seconds