Multiple choice technology databases

Which of the following DB2 data types can NOT be used to create an identity column?

  1. SMALLINT

  2. NUMERIC

  3. INTEGER

  4. DOUBLE

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Identity columns in DB2 require exact numeric types with a scale of zero (whole numbers): SMALLINT, INTEGER, or BIGINT. DECIMAL/NUMERIC with scale 0 also work. DOUBLE is a floating-point type with imprecise representation and cannot be used for identity columns because identity values must be exact, predictable integers.