On Thu, Jun 06, 2002 at 12:45:09PM -0400, Lee Green wrote:
> If you need to get the actual "current value" without incrementing, try:
>
> SELECT last_value FROM <sequence_name>;
>
> This will return the last value returned from a nextval command directly
>
> from the sequence properties in the system tables.
Except that if you do it this way, you *will* be affected by setvals done by
other users. Use currval(), that's what it's there for.
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.