Multiple choice technology databases

What is the physical storage length of DB2 data types-DATE,TIME,TIMESTAMP?

  1. 8 bytes, 6 bytes, 26 bytes

  2. 4 bytes, 3 bytes, 13 bytes

  3. 4 bytes, 3 bytes, 10 bytes

  4. 10 bytes, 8 bytes, 26 bytes

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

In IBM DB2, the physical storage length for a DATE data type is 4 bytes, TIME is 3 bytes, and TIMESTAMP is 10 bytes for the standard format. Therefore, option C provides the exact internal byte lengths for these datetime types.

AI explanation

In DB2, the external (display) lengths of these data types are: DATE is 10 bytes (e.g., YYYY-MM-DD), TIME is 8 bytes (e.g., HH.MM.SS), and TIMESTAMP is 26 bytes (date + time + microseconds). These are the standard character representations DB2 uses when the values are displayed or moved to character host variables, distinct from their more compact internal binary storage.