This topic lists the available SQL and PL data types and indicates whether the data types are supported by the OceanBase JDBC driver.
SQL data types
| SQL data type | Supported by JDBC |
|---|---|
| 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
The OceanBase JDBC driver supports the NCHAR type only indirectly, without the corresponding
java.sql.Typestype, but it can access data of this type if the application calls theformOfUse(NCHAR)method.The OceanBase JDBC driver directly supports the NVARCHAR2 type in JSE 6. The OceanBase JDBC driver indirectly supports the NVARCHAR2 type in J2SE 5.0. The OceanBase JDBC driver does not have the corresponding
java.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 by JDBC |
|---|---|
| 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 by JDBC |
|---|---|
| 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 classes:
Scalar types
Scalar character types, including
BOOLEANandDATEdata typesComposite types
Reference types
Large object (LOB) types
| PL data type | Supported by JDBC |
|---|---|
| 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.