Table 9-3 shows how the Oracle data types are mapped to the standard ODBC data types.
“Unicode Support” lists Oracle to Unicode data type mappings.
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 will return an Unknown Data Type error (SQL State HY000).
See “Retrieving Data Type Information” for more information about data types.
Oracle 9i R2 and higher supports the XMLType data type. The Oracle Wire Protocol driver supports tables containing columns whose data type is specified as XMLType.
When inserting or updating XMLType columns, the data to be inserted or updated must be in the form of an XMLType data type. The database provides functions to construct XMLType data. The xmlData argument to xmltype( ) may be specified as a string literal.
The following example from the Oracle Web site demonstrates how to create a table, insert data, and retrieve data. Creating a table with XMLType is done the same way as creating a regular table in the Oracle database, using standard SQL syntax:
The PURCHASEORDER table contains one column—PODOCUMENT—with a data type of XMLType (
sys.XMLTYPE). The next step is to insert one purchase order, created by the static function
sys.XMLTYPE.createXML: