get_next_sequence_value
Fetch the next value from an Oracle sequence, advancing its counter for unique IDs. Verify cached values against the target table before use as a key.
Instructions
Return the NEXTVAL of a sequence. WARNING: this is a side-effecting read — calling it advances the sequence counter and the consumed value cannot be reused. When the sequence has cache > 0 the returned value may already be consumed elsewhere; before using it as a key, verify it is not already present in the target table. Use sparingly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | No | Schema (owner) of the sequence. Optional — defaults to the server's current schema; omit rather than guess. | |
| sequence | Yes | Sequence name. |