skip to main content
Part 2: The 32-Bit/64-Bit Drivers : The Oracle Driver : Data Types
  
Data Types
The following table shows how the Oracle data types are mapped to the standard ODBC data types. Unicode Support lists Oracle to Unicode data type mappings.
Table 39. Oracle Data Types
Oracle
ODBC
BFILE1
SQL_LONGVARBINARY
BINARY DOUBLE2
SQL_REAL
BINARY FLOAT3
SQL_DOUBLE
BLOB4
SQL_LONGVARBINARY
CHAR5
SQL_CHAR
CLOB6, 7
SQL_LONGVARCHAR
DATE
SQL_TYPE_TIMESTAMP
LONG8
SQL_LONGVARCHAR
LONG RAW
SQL_LONGVARBINARY
NCHAR9
SQL_WVARCHAR
NCLOB10
SQL_WLONGVARCHAR
NVARCHAR211
SQL_WVARCHAR
NUMBER
SQL_DOUBLE
NUMBER (p,s)
SQL_DECIMAL
RAW
SQL_VARBINARY
Oracle
ODBC
TIMESTAMP12
SQL_TIMESTAMP
TIMESTAMP WITH LOCAL TIMEZONE13
SQL_TIMESTAMP
TIMESTAMP WITH TIMEZONE14
SQL_VARCHAR
VARCHAR215
SQL_VARCHAR
XMLType16
SQL_LONGVARCHAR

1 Read-Only

2 Supported only on Oracle 10g and higher.

3 Supported only on Oracle 10g and higher.

4 Valid when connecting to Oracle 8 servers; these data types support output parameters to stored procedures

5 If the database character set is set to UTF-8, the Oracle driver maps the CHAR data type to SQL_WCHAR.

6 Valid when connecting to Oracle 8 servers; these data types support output parameters to stored procedures

7 If the database character set is set to UTF-8, the Oracle driver maps the CLOB data type to SQL_WLONGVARCHAR.

8 If the database character set is set to UTF-8, the Oracle driver maps the LONG data type to SQL_WLONGVARCHAR.

9 Supported only when the EnableNcharSupport connection option is enabled.

10 Supported only when the EnableNcharSupport connection option is enabled.

11 Supported only when the EnableNcharSupport connection option is enabled.

12 Supported only on Oracle 9i and higher.

13 Supported only on Oracle 9i and higher.

14 Supported only on Oracle 9i and higher.

15 If the database character set is set to UTF-8, the Oracle driver maps the VARCHAR2 data type to SQL_WVARCHAR.

16 XMLType columns with binary or object relational storage are not supported.

The Oracle driver does not support any object types (also known as abstract data types). When the driver encounters an object type during data retrieval, it will return an Unknown Data Type error (SQL State HY000).
See Retrieving Data Type Information for more information about data types.
* XMLType
* Examples