This topic lists the available SQL and PL data types and indicates whether the data types are supported by OceanBase Connector/J.
SQL data types
| SQL data type | Supported |
|---|---|
| BLOB | Yes |
| CHAR | Yes |
| CLOB | Yes |
| DATE | Yes |
| NCHAR | No |
| NCHAR VARYING | No |
| NUMBER | Yes |
| NVARCHAR2 | Yes |
| RAW | Yes |
| REF | Yes |
| ROWID | Yes |
| UROWID | No |
| VARCHAR2 | Yes |
Note
OceanBase Connector/J supports the
NCHARtype only indirectly, without the correspondingjava.sql.Typestype, but it can access data of this type if the application calls theformOfUse(NCHAR)method.OceanBase Connector/J directly supports the
NVARCHAR2type in JSE 6. OceanBase Connector/J indirectly supports theNVARCHAR2type in J2SE 5.0. OceanBase Connector/J does not have the correspondingjava.sql.Typestype, but it can access data of this type if the application calls theformOfUse(NCHAR)method.
SQL data types supported by ANSI
| SQL data type supported by ANSI | Supported |
|---|---|
| CHARACTER | Yes |
| DEC | Yes |
| DECIMAL | Yes |
| DOUBLE PRECISION | Yes |
| FLOAT | Yes |
| INT | Yes |
| INTEGER | Yes |
| NATIONAL CHARACTER | No |
| NATIONAL CHARACTER VARYING | No |
| NATIONAL CHAR | Yes |
| NATIONAL CHAR VARYING | No |
| NCHAR | Yes |
| NCHAR VARYING | No |
| NUMERIC | Yes |
| REAL | Yes |
| SMALLINT | Yes |
| VARCHAR | Yes |
User-defined SQL data types
| User-defined SQL data type | Supported |
|---|---|
| OPAQUE | Yes |
| Reference types | Yes |
| Object types (JAVA_OBJECT) | Yes |
| Nested table and variable array | Yes |
PL data types
PL data types can be categorized into the following types:
Scalar types
Scalar character types, including
BOOLEANandDATEdata typesComposite types
Reference types
Large object (
LOB) types
| PL data type | Supported |
|---|---|
| Scalar types: | |
| BINARY INTEGER | Yes |
| DEC | Yes |
| DECIMAL | Yes |
| DOUBLE PRECISION | Yes |
| FLOAT | Yes |
| INT | Yes |
| INTEGER | Yes |
| NATURAL | Yes |
| NATURAL n | No |
| NUMBER | Yes |
| NUMERIC | Yes |
| PLS_INTEGER | Yes |
| POSITIVE | Yes |
| POSITIVE n | No |
| REAL | Yes |
| SIGNTYPE | Yes |
| SMALLINT | Yes |
| Scalar character types: | |
| CHAR | Yes |
| CHARACTER | Yes |
| LONG | Yes |
| LONG RAW | Yes |
| NCHAR | No |
| NVARCHAR2 | No |
| RAW | Yes |
| ROWID | Yes |
| STRING | Yes |
| UROWID | No |
| VARCHAR | Yes |
| VARCHAR2 | Yes |
| BOOLEAN | Yes |
| DATE | Yes |
| Composite types: | |
| RECORD | No |
| TABLE | No |
| VARRAY | Yes |
| Reference types: | |
| REF CURSOR type | Yes |
| Object reference type | Yes |
| LOB types: | |
| BLOB | Yes |
| CLOB | Yes |
| NCLOB | Yes |
Note
NATURAL,NATURALn,POSITIVE,POSITIVEn, andSIGNTYPEare subtypes ofBINARY INTEGER.DEC,DECIMAL,DOUBLE PRECISION,FLOAT,INT,INTEGER,NUMERIC,REAL, andSMALLINTare subtypes ofNUMBER.NCHARandNVARCHAR2are indirectly supported. The OceanBase JDBC driver does not have the correspondingjava.sql.Typestype, but it can access data of these types if the application calls theformOfUse(NCHAR)method.