Updating a Sequence
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Updating a Sequence

  1. #1
    Join Date
    Mar 2004
    Posts
    55

    Updating a Sequence

    I am to alter the next value in a sequence i have however i am unsure of the syntax and could not find something i could understand in pasts posts.


    When I do select * from all_sequences i see we have a LAST_NUMBER field. How can I adjust this to a new number above this.


    Thanks

  2. #2
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Let's say your sequence is currently at value 101, you wan't it to skip immediately to value 1001 and then retrive values from there on. One of the methods is:
    Code:
    alter sequence my_seq increment by 900;
    select my_seq.nextval from dual:
    alter sequence my_seq increment by 1;
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width