|
|
The NEXT_VALUE Function
Syntax for the NEXT_VALUE function:
Rules:
- The result will be the next value in the series of the values defined by the sequence specified in sequence_name (this value will then become the current value for the sequence).
- If the sequence is unique and the current value of the sequence specified in sequence_name is already equal to the last value in the series of the values defined by it an error will be raised and the current value of the sequence will remain unchanged.
- If the sequence is non-unique, the function will always succeed. If the current value of the sequence specified in sequence_name is equal to the last value in the series of values generated by the sequence, the initial value of the sequence will be returned.
- The function can be used where a value-expression would normally be used. It can also be used after the DEFAULT clause in the CREATE DOMAIN, CREATE TABLE and ALTER TABLE statements.
- This function is used to establish the initial value of the sequence after it has been created using the CREATE SEQUENCE statement.
- USAGE privilege must be held on the sequence in order to use it.
|
Upright Database Technology AB Voice: +46 18 780 92 00 Fax: +46 18 780 92 40 dbtechnology@upright.se |
|
|