On Thu, 13 Jun 2002, Charlie Toohey wrote:
> If session A and session B are concurrently doing the same master-detail
> transaction, wouldn't currval possibly reflect the sequence value used by the
> other session ? Or are you saying that since this will be an explicit
> transaction that currval won't reflect the fact that the sequence may have
> been incremented by another session ?
currval is defined to give the last value given to your session. The only
cases you have to watch out for are other potential nextvals in your
session (triggers/rules), but usually you can find those pretty easily.