Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How get the current value from a sequence?
DA Morgan wrote:
> Craig & Co. wrote: >>>> damorgan_at_x.washington.edu
>>> You are ignoring advice given to you multiple times, in the group's
>>> archives and well documented on many web sites. So here it is again:
>>>
>>> CURRVAL only works within the current session following a NEXTVAL.
>>>
>>> Once you end the session CURRVAL is meaningless until you again use
>>> NEXTVAL which increments the counter yet again.
>>>
>>> If you want the current value of a sequence when first logging on
>>> the only way to do so is a query against one of the xxx_sequence data
>>> dictionary views.
>>> --
>>> Daniel A. Morgan
>>> University of Washington
> > > No need to apologize ... but I'd sure like the name of the book > so I can warn my students away from it.
Why warn away from that book? Unless I'm reading that explanation from the book incorrectly, it says exactly what you said. Received on Mon Dec 06 2004 - 10:08:04 CST