amar on web

Resetting a sequence value

What is the easiest way to set a sequence to a very high value.

E.g.  currval = 100, set it to point to 1100.

Instead of dropping and recreating the sequence again, use the INCREMENT BY option to reset a sequence value.


      Alter sequence x 
         increment by 1000; 

     select x.nextval from dual; 

      Alter sequence x 
           increment by 1;     

You can also decrement the sequence value by incrementing it with a negative number. Don't forget to reset the increment value to 1 or as the case.

Best viewed in medium text size. Please refresh this page (F5) to view the latest information.
This page was created on 16-dec-2001 and last updated on 16-dec-2001.
please forward all queries to amar_padhi@fastmail.fm