skip to main content
Part 2: The 32-Bit/64-Bit Drivers : The Oracle Wire Protocol 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 24. Oracle Data Types
Oracle
ODBC
BFILE1
SQL_LONGVARBINARY
BINARY DOUBLE2
SQL_REAL
BINARY FLOAT3
SQL_DOUBLE
BLOB4, 5
SQL_LONGVARBINARY
CHAR6
SQL_CHAR
CLOB7, 8, 9
SQL_LONGVARCHAR
DATE
SQL_TYPE_TIMESTAMP
LONG10
SQL_LONGVARCHAR
LONG RAW
SQL_LONGVARBINARY
NCHAR11
SQL_WVARCHAR
NCLOB12
SQL_WLONGVARCHAR
NVARCHAR213
SQL_WVARCHAR
NUMBER
SQL_DOUBLE
NUMBER (p,s)
SQL_DECIMAL
RAW
SQL_VARBINARY
TIMESTAMP14
SQL_TIMESTAMP
TIMESTAMP WITH LOCAL TIMEZONE15, 16
SQL_TIMESTAMP
TIMESTAMP WITH TIMEZONE17, 18
SQL_VARCHAR
VARCHAR219
SQL_VARCHAR
XMLType20
SQL_LONGVARCHAR

1 Read-Only

2 Supported only on Oracle 10g and higher.

3 Supported only on Oracle 10g and higher.

4 Supported only on Oracle 10g and higher.

5 Supported in basic file and SecureFiles storage.

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

7 Supported only on Oracle 10g and higher.

8 Supported in basic file and SecureFiles storage.

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

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

11 Supported only when the EnableNcharSupport connection option is enabled.

12 Supported only when the EnableNcharSupport connection option is enabled.

13 Supported only when the EnableNcharSupport connection option is enabled.

14 Supported only on Oracle 9i and higher.

15 Supported only on Oracle 9i and higher.

16 Timestamp with timezone mapping changes based on the setting of the Fetch TSWTZ as Timestamp option only on Oracle 10g R2 and higher.

17 Supported only on Oracle 9i and higher.

18 Timestamp with timezone mapping changes based on the setting of the Fetch TSWTZ as Timestamp option only on Oracle 10g R2 and higher.

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

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

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