Updating nextval in sequence in oracle'.'
You can get information about any session cursor from its attributes (which you can reference in procedural statements, but not in SQL statements).
When a sequence number is generated, the sequence is incremented, independent of the transaction committing or rolling back.
If two users concurrently increment the same sequence, then the sequence numbers each user acquires may have gaps, because sequence numbers are being generated by the other user.
If you close and immediately reopen an explicit cursor, PL/SQL does not reparse the associated query. To save an attribute value for later use, assign it to a local variable immediately.
Otherwise, other operations, such as subprogram invocations, might change the value of the attribute before you can test it.