CURRENT-VALUE statement
Resets the current integer value of a sequence defined in the Data Dictionary.
Syntax
sequence
logical-dbname
expression
ExampleThe following example resets the current value of the NextCustNum sequence to the
CustNum
value of the last Customer record if that is a valid value for the sequence:
Notes
- The user must have CAN-WRITE privileges on the _Sequence table to use the CURRENT-VALUE statement.
- The value of a sequence set by the CURRENT-VALUE statement persists in the database until the next CURRENT-VALUE statement or NEXT-VALUE function is invoked for the sequence, or until the sequence is deleted from the database.
- You cannot set a sequence to the Unknown value (
?
).- You can use any combination of the NEXT-VALUE function, CURRENT-VALUE function, CURRENT-VALUE statement, and their dynamic versions. Use the dynamic version when you don’t know what the database name or sequence name is at run time.
See alsoCURRENT-VALUE function, DYNAMIC-CURRENT-VALUE function, DYNAMIC-CURRENT-VALUE statement, DYNAMIC-NEXT-VALUE function, NEXT-VALUE function
OpenEdge Release 10.2B
|