Which of the following DB2 objects can be referenced by an INSERT statement to generate values for a column?
-
Sequence
-
Identity column
-
Trigger
-
Table function
A
Correct answer
Explanation
DB2 Sequences are database objects specifically designed to generate numeric values according to defined rules, and they can be directly referenced in INSERT statements (via NEXT VALUE FOR or PREVIOUS VALUE FOR) to populate columns. While identity columns also generate values, sequences are more flexible and reusable across tables. Triggers execute logic rather than generating values, and table functions return result sets.