Next Value For Clause
- Last Updated: May 15, 2020
- 1 minute read
- DataDirect Connectors
- JDBC
- IBM Db2 5.1
- MySQL 5.1
- Progress OpenEdge 5.1
- SAP Sybase 5.1
- Documentation
Purpose
Specifies the next value for a sequence that is used in a Select, Insert, or Update statement.
Syntax
NEXT VALUE FOR sequence_name
where:
- sequence_name
- specifies the name of the sequence from which to retrieve the value.
Example
This example retrieves the next value or set of values in Sequence1:
SELECT NEXT VALUE FOR Sequence1 FROM Account