What is the physical storage length of DB2 data types-DATE,TIME,TIMESTAMP?
-
8 bytes, 6 bytes, 26 bytes
-
4 bytes, 3 bytes, 13 bytes
-
4 bytes, 3 bytes, 10 bytes
-
10 bytes, 8 bytes, 26 bytes
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.
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.