Transfer from http://blog.csdn.net/haofeng82/article/details/34857991
|
Java.sql.Types value |
Java type |
IBM DB2 |
Oracle |
Sybase |
Sql |
Informix |
IBM Content Manager |
|
BIGINT |
Java.lang.long |
BIGINT |
Number (38, 0) |
BIGINT |
BIGINT |
INT8 |
Dk_cm_bigint |
|
BINARY |
Byte[] |
CHAR for BIT DATA |
RAW |
BINARY |
IMAGE |
BYTE |
Dk_cm_blob |
|
BIT |
Java.lang.Boolean |
N/A |
BIT |
BIT |
BIT |
BIT |
Dk_cm_smallint |
|
Blob |
Byte[] |
Blob |
Blob |
Blob |
Blob |
Blob |
Dk_cm_blob |
|
CHAR |
Java.lang.String |
CHAR, GRAPHIC |
CHAR |
CHAR |
CHAR |
CHAR |
Dk_cm_char |
|
Clob |
Java.lang.String |
CLOB, Dbclob |
Clob |
Clob |
Clob |
Clob |
Dk_cm_clob |
|
DATE |
Java.sql.Date |
DATE |
DATE |
DATE |
DATE |
DATE |
Dk_cm_date |
|
DECIMAL |
Java.math.BigDecimal |
DECIMAL |
Number |
DECIMAL, Money, smallmoney |
DECIMAL |
DECIMAL |
Dk_cm_decimal |
|
DOUBLE |
Java.lang.Double |
DOUBLE |
DOUBLE PRECISION |
DOUBLE PRECISION |
DOUBLE PRECISION |
DOUBLE PRECISION |
Dk_cm_double |
|
FLOAT |
Java.lang.Double |
FLOAT |
FLOAT |
FLOAT |
FLOAT |
FLOAT |
Dk_cm_double |
|
INTEGER |
Java.lang.Integer |
INTEGER |
INTEGER |
Int |
INTEGER |
INTEGER |
Dk_cm_integer |
|
Java_object |
Java.lang.Object |
Java_object |
Java_object |
Java_object |
Java_object |
OPAQUE |
N/A |
|
LongVarBinary |
Byte[] |
LONG VARCHAR for BIT DATA |
LONG RAW |
IMAGE |
IMAGE |
BYTE |
Dk_cm_blob |
|
LongVarChar |
Java.lang.String |
Long VARCHAR, Long vargraphic |
LONG |
TEXT |
TEXT |
TEXT |
Dk_cm_varchar (3500) |
|
NUMERIC |
Java.math.BigDecimal |
NUMERIC |
Number |
NUMERIC |
NUMERIC |
NUMERIC |
Dk_cm_decimal |
|
Other |
Java.lang.Object |
Other |
Other |
Other |
Other |
Other |
N/A |
|
REAL |
Java.lang.Float |
REAL |
REAL |
REAL |
REAL |
REAL |
Dk_cm_double |
|
SMALLINT |
Java.lang.Integer |
SMALLINT |
SMALLINT |
SMALLINT |
SMALLINT |
SMALLINT |
Dk_cm_integer |
|
Time |
Java.sql.Time |
Time |
DATE |
Time |
Time |
DATETIME HOUR to SECOND |
Dk_cm_time |
|
TIMESTAMP |
Java.sql.Timestamp |
TIMESTAMP |
DATE |
DATETIME, smalldatetime |
Datetime |
DATETIME year to fraction (5) |
Dk_cm_timestamp |
|
TINYINT |
Java.lang.Bute |
SMALLINT |
TINYINT |
TINYINT |
TINYINT |
TINYINT |
Dk_cm_integer |
|
VARBINARY |
Byte[] |
VARCHAR for BIT DATA |
RAW |
VARBINARY |
IMAGE |
BYTE |
Dk_cm_blob |
|
VARCHAR |
Java.lang.String |
VARCHAR, Vargraphic |
VARCHAR |
VARCHAR |
VARCHAR |
VARCHAR |
Dk_cm_varchar
|
The correspondence between Jdbctype and Javatype