Oracle8i JDBC Developer's Guide and Reference Release 8.1.5 A64685-01 |
|
The Oracle JDBC drivers support the SQL datatypes required by JDBC 1.22. In addition, the Oracle JDBC drivers support the Oracle-specific ROWID
datatype and user-defined types of the REF CURSOR
category.
For reference, the following table shows the default mappings between JDBC datatypes, native Java datatypes, SQL datatypes, and the corresponding Java datatypes defined by Oracle extensions.
The Standard JDBC Datatypes column lists the datatypes supported by the JDBC 1.22 standard. All of these dataypes are defined in the java.sql.Types
class.
The Java Native Datatypes column lists the datatypes defined by the Java language.
The SQL Datatypes column lists the SQL datatypes that exist in the database.
The Oracle Extensions--Java Classes that Represent SQL Datatypes column lists the oracle.sql.*
Java types that correspond to each SQL datatype in the database. These are Oracle extensions that let you retrieve all SQL data in the form of a oracle.sql.*
Java type. Mapping SQL datatypes into the oracle.sql
datatypes lets you store and retrieve data without losing information. Refer to "Classes of the oracle.sql Package" for more information on the oracle.sql.*
package.
For a list of all of the Java datatypes to which you can validly map a SQL datatype, see "Valid SQL-JDBC Datatype Mappings".
In addition, the following JDBC extensions for SQL datatypes (most of which comply with the JDBC 2.0 standard) are supported. They are not described until Chapter 4, "Oracle Extensions", but are summarized here for reference. Table 3-2 shows their mappings to Oracle datatypes.
The SQL Datatype column lists the SQL datatypes that exist in the database.
The JDBC Extensions for SQL Datatypes column lists the types into which Oracle datatypes should map according to the JDBC 2.0 standard. The class oracle.jdbc.driver.OracleTypes.*
includes the definitions of Oracle-specific types that do not exist in the JDBC standard and is a superset of oracle.sql.*
.
The Oracle Extensions--Java Classes that Represent SQL Datatypes column lists the oracle.sql.*
Java types that correspond to each SQL datatype in the database. These are Oracle extensions that let you retrieve all SQL data in the form of a oracle.sql.*
Java type. Refer to "Classes of the oracle.sql Package" for more information on the oracle.sql.*
package.
For a list of all of the Java datatypes to which you can validly map a SQL datatype, see "Valid SQL-JDBC Datatype Mappings".
See Chapter 4, "Oracle Extensions", for more information on type mappings. In Chapter 4 you can also find more information on:
oracle.sql
, oracle.jdbc.driver
, and oracle.jdbc2
ROWID
datatype and user-defined types of the REF
CURSOR
category