Java数据类型与SQL数据类型的映射
SQL Data Type |
Java Data Type |
char/varchar/longvarchar |
String |
numeric/decimal |
java.math.BigDecimal |
bit |
boolean |
tinyint |
byte |
smallint |
short |
integer |
int |
bigint |
long |
real |
float |
float/double |
double |
binary/varbinary/longvarbinary |
byte[] |
date |
java.sql.Date |
time |
java.sql.Time |
timestamp |
java.sql.Timestamp |
|
|