apache > db
Apache DB Project
 
Font size:      

java.sql.Types

java.sql.Types

Table 12 shows the mapping of java.sql.Types to SQL types.

Table 12. Mapping of java.sql.Types to SQL Types

java.sql.Types SQL Types
BIGINTBIGINT
BINARYCHAR FOR BIT DATA
BIT1 CHAR FOR BIT DATA
BLOBBLOB (JDBC 2.0 and up)
CHARCHAR
CLOBCLOB (JDBC 2.0 and up)
DATEDATE
DECIMALDECIMAL
DOUBLEDOUBLE PRECISION
FLOAT DOUBLE PRECISION2
INTEGERINTEGER
LONGVARBINARY LONG VARCHAR FOR BIT DATA
LONGVARCHAR LONG VARCHAR
NULLNot a data type; always a value of a particular type
NUMERICDECIMAL
REALREAL
SMALLINTSMALLINT
TIMETIME
TIMESTAMPTIMESTAMP
VARBINARYVARCHAR FOR BIT DATA
VARCHARVARCHAR

Notes:

  1. BIT is only valid in JDBC 2.0 and earlier environments.
  2. Values can be passed in using the FLOAT type code; however, these are stored as DOUBLE PRECISION values, and so always have the type code DOUBLE when retrieved.

Previous Page
Next Page
Table of Contents
Index