A programmer wants to generate values for a numeric ID column in their EXPENSE table. The ID column values need to be incremented by 1000 for each new expense report added to the EXPENSE table. Which DB2 object can be referenced by an INSERT statement to meet thisrequirement?
-
Sequence
-
Table Function
-
Identity Column
-
INSTEAD OF Trigger
A
Correct answer
Explanation
A DB2 Sequence can generate numeric values with any increment value, including 1000. Sequences are independent database objects designed specifically for generating unique numeric values. Identity columns are tied to specific tables, table functions return result sets, and INSTEAD OF triggers modify insert operations but don't generate incremental values.