VwpFAQJDBCTypes

What are the standard JDBC type conversions for rowsets?

SQL data types returned in rowsets are converted to Java specification data types according to the table of JDBC Types Mapped to Java Types in Appendix B of the JDBC 3.0 Specification (copied below). For more information, see JDBC 3.0 - Final Release.

JDBC Type Java Type
CHAR java.lang.String
VARCHAR java.lang.String
LONGVARCHAR java.lang.String
NUMERIC java.math.BigDecimal
DECIMAL java.math.BigDecimal
BIT boolean
BOOLEAN boolean
TINYINT byte
SMALLINT short
INTEGER int
BIGINT long
REAL float
FLOAT double
DOUBLE double
BINARY byte[[ | ]]
VARBINARY byte[[ | ]]
LONGVARBINARY byte[[ | ]]
DATE java.sql.Date
TIME java.sql.Time
TIMESTAMP java.sql.Timestamp
CLOB java.sql.Clob
BLOB java.sql.Blob
ARRAY java.sql.Array
DISTINCT (mapping of underlying type)
STRUCT java.sql.Struct
REF java.sql.Ref
DATALINK java.net.URL
JAVA_OBJECT (underlying Java class)
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo