Type codes v16

Type codes for external data types

The following table contains the type codes for external data types. An external data type is used to indicate the type of a C host variable. When an application binds a value to a parameter or binds a buffer to a SELECT-list item, set the type code in the corresponding SQLDA descriptor (descriptor->T[column]) to one of the following values:

Type codeHost variable type (C data type)
1, 2, 8, 11, 12, 15, 23, 24, 91, 94, 95, 96, 97char[]
3int
4, 7, 21float
5, 6null-terminated string (char[length+1])
9varchar
22double
68unsigned int

Type codes for internal data types

The following table contains the type codes for internal data types. An internal type code is used to indicate the type of a value as it resides in the database. The DESCRIBE SELECT LIST statement populates the data type array (descriptor->T[column]) using the following values.

Internal type codeServer type
1VARCHAR2
2NUMBER
8LONG
11ROWID
12DATE
23RAW
24LONG RAW
96CHAR
100BINARY FLOAT
101BINARY DOUBLE
104UROWID
187TIMESTAMP
188TIMESTAMP W/TIMEZONE
189INTERVAL YEAR TO MONTH
190INTERVAL DAY TO SECOND
232TIMESTAMP LOCAL_TZ