2.2.5.4.1 Fixed-Length Data Types

The fixed-length data types include the following types.

 NULLTYPE         =   %x1F  ; Null 
 INT1TYPE         =   %x30  ; TinyInt 
 BITTYPE          =   %x32  ; Bit 
 INT2TYPE         =   %x34  ; SmallInt 
 INT4TYPE         =   %x38  ; Int 
 DATETIM4TYPE     =   %x3A  ; SmallDateTime 
 FLT4TYPE         =   %x3B  ; Real 
 MONEYTYPE        =   %x3C  ; Money 
 DATETIMETYPE     =   %x3D  ; DateTime 
 FLT8TYPE         =   %x3E  ; Float 
 MONEY4TYPE       =   %x7A  ; SmallMoney 
 INT8TYPE         =   %x7F  ; BigInt 
  
 FIXEDLENTYPE     =   NULLTYPE
                      /
                      INT1TYPE
                      /
                      BITTYPE
                      /
                      INT2TYPE
                      /
                      INT4TYPE
                      /
                      DATETIM4TYPE
                      /
                      FLT4TYPE
                      /
                      MONEYTYPE
                      /
                      DATETIMETYPE
                      /
                      FLT8TYPE
                      /
                      MONEY4TYPE
                      /
                      INT8TYPE

Non-nullable values are returned using these fixed-length data types. There is no data associated with NULLTYPE.<13> For the rest of the fixed-length data types, the length of data is predefined by the type. There is no TYPE_VARLEN field in the TYPE_INFO rule for these types. In the TYPE_VARBYTE rule for these types, the TYPE_VARLEN field is BYTELEN, and the value is 1 for INT1TYPE/BITTYPE, 2 for INT2TYPE, 4 for INT4TYPE/DATETIM4TYPE/FLT4TYPE/MONEY4TYPE, and 8 for MONEYTYPE/DATETIMETYPE/FLT8TYPE/INT8TYPE. The value represents the number of bytes of data to be followed. The SQL data types of the corresponding fixed-length data types are in the comment part of each data type.

Show: