Data types
- Last Updated: May 4, 2021
- 1 minute read
- DataDirect Connectors
- ODBC
- Oracle Database Wire Protocol 8.0
- Documentation
The following table shows how the Oracle data types are mapped to the standard ODBC data types.
| Oracle | ODBC |
|---|---|
| BFILE1 | SQL_LONGVARBINARY |
| BINARY DOUBLE | SQL_REAL |
| BINARY FLOAT | SQL_DOUBLE |
| BLOB2 | SQL_LONGVARBINARY |
| CHAR | SQL_CHAR |
| CLOB3 | SQL_LONGVARCHAR |
| DATE | SQL_TYPE_TIMESTAMP |
| INTERVAL DAY TO SECOND | SQL_VARCHAR |
| INTERVAL YEAR TO MONTH | SQL_VARCHAR |
| LONG | SQL_LONGVARCHAR |
| LONG RAW | SQL_LONGVARBINARY |
| NCHAR | SQL_WVARCHAR |
| NCLOB | SQL_WLONGVARCHAR |
| NVARCHAR2 | SQL_WVARCHAR |
| NUMBER | SQL_DOUBLE |
| NUMBER (p,s) | SQL_DECIMAL |
| RAW | SQL_VARBINARY |
| TIMESTAMP | SQL_TIMESTAMP |
| TIMESTAMP WITH LOCAL TIMEZONE | SQL_TIMESTAMP |
| TIMESTAMP WITH TIMEZONE | SQL_VARCHAR |
| VARCHAR2 | SQL_VARCHAR |
| XMLType4 | SQL_LONGVARCHAR |
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.
1 Read-Only
2 Supported in basic
file and SecureFiles storage.
3 Supported in basic file and SecureFiles
storage.
4 XMLType columns with object
relational storage are not supported.