numbering |
Database Type |
JDBC Type |
JDBC Index |
Description |
1 |
Int |
Java.lang.Integer |
4 |
|
2 |
varchar |
Java.lang.String |
12 |
|
3 |
Char |
Java.lang.String |
1 |
|
4 |
NChar |
Java.lang.String |
1 |
|
5 |
nvarchar |
Java.lang.String |
12 |
|
6 |
Text |
Java.lang.String |
-1 |
|
7 |
ntext |
Java.lang.String |
-1 |
|
8 |
tinyint |
Java.lang.Integer |
-6 |
|
9 |
Int |
Java.lang.Integer |
4 |
|
10 |
tinyint |
Java.lang.Integer |
-6 |
|
11 |
smallint |
Java.lang.Integer |
5 |
|
12 |
Bit |
Java.lang.Boolean |
-7 |
|
13 |
bigint |
Java.lang.Long |
-5 |
|
14 |
Float |
Java.lang.Double |
6 |
|
15 |
Decimal |
Java.math.BigDecimal |
3 |
|
16 |
Money |
Java.math.BigDecimal |
3 |
|
17 |
SmallMoney |
Java.math.BigDecimal |
3 |
|
18 |
Numeric |
Java.math.BigDecimal |
2 |
|
19 |
Real |
Java.lang.Float |
7 |
|
20 |
uniqueidentifier |
Java.lang.String |
1 |
|
21st |
smalldatetime |
Java.sql.Timestamp |
93 |
|
22 |
Datetime |
Java.sql.Timestamp |
93 |
|
23 |
Timestamp |
Byte[] |
-2 |
|
24 |
Binary |
Byte[] |
-2 |
|
25 |
varbinary |
Byte[] |
-3 |
|
26 |
Image |
Byte[] |
-4 |
|
27 |
sql_variant |
Java.lang.String |
12 |
Reference Original: http://blog.csdn.net/lg312200538/article/details/5993049
Web back-end notes SQL Server corresponds to Java data types