Create Sequence
- 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
Creates an auto-incrementing sequence for a local table.
Syntax
CREATE SEQUENCE sequence_name [AS {INTEGER | BIGINT}]
[START WITH start_value] [INCREMENT BY increment_value]
where:
- sequence_name
- specifies the name of the sequence. By default, the sequence type is INTEGER.
- start_value
- specifies the starting value of the sequence. The default start
value is
0. - increment_value
- specifies the value of the increment; the value must be a positive integer.
The default increment is
1.