Table 1


Java and JDBC 2.0 type mapping.Java and JDBC 2.0 type mapping.

Java TypeJDBC Type
StringCHAR, VARCHAR, LONGVARCHAR
java.math.BigDecimalNUMERIC
booleanBIT
byteTINYINT
shortSMALLINT
intINTEGER
longBIGINT
floatREAL
doubleDOUBLE
byte[]BINARY, VARBINARY, LONGVARBINARY
java.sql.DateDATE
java.sql.TimeTIME
java.sql.TimestampTIMESTAMP
ClobCLOB
ArrayARRAY
StructSTRUCT
RefREF
Java classJAVA_OBJECT

Source: XML, Java, and Database Magic (Prentice Hall), reprinted by permission.