What Is Sequence in Db2
A Sequence Is a Software Function That Generates Integer Numbers in Either Ascending or Descending Order, Within a Definite Range, to Generate Primary Key and...
A sequence is a software function that generates integer numbers in either ascending or descending order, within a definite range, to generate primary key and coordinate other keys among the table. You use sequence for availing integer numbers say, for employee_id or transaction_id.
How do you create a sequence in DB2?
- Specify an INCREMENT value of zero and a START WITH value that does not exceed MAXVALUE. …
- Specify the same value for START WITH, MINVALUE, and MAXVALUE, and specify CYCLE.
Must Read
How do I delete a sequence in DB2?
To delete a sequence, use the DROP statement.