DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: sequence nextval

  1. #1
    Join Date
    May 2002
    Location
    USA
    Posts
    462

    sequence nextval

    Hi ,
    initially i checked last value of sequence from toad
    value was 133 .

    i connected to a new session and queried

    it displayed
    select xyz.nextval from seqxyz ;
    124

    again i query xyz.currval from seqxyz ;
    124

    i was expecting output to be 133 ...
    but got 124 am i mising any funda ...

    Thanks

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    toad=gui
    gui=i don't understand what's really happening
    Jeff Hunter

  3. #3
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    The sequence has cached values - Toad is reading from the %_sequences view, in which the last_number increments by the cache value of the sequence. Keep selecting nextval from the sequence and when it reaches the value of last_number, you'll see last_number increment by however many sequence numbers are cached.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  4. #4
    Join Date
    May 2002
    Location
    USA
    Posts
    462
    Thanks to all ,

    i was just wondering from where toad is getting those values from .. ( the difference in values might have been in cached , which i am not seeing immediatlely through currval )

    Regards
    Siva Prakash

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