Java类型和MySQL类型对照表
| mysql | java |
|---|---|
char | String/Byte |
varchar | String |
tinyint(1) | Boolean/Integer |
int | Integer |
bigint | Long |
float | Float |
double | Double |
integer | Integer |
decimal | BigDecimal/Double |
text | String |
datetime | Date |
timestamp | Date/LocalDateTime |
本文详细介绍了Java中的各种基本类型如何映射到MySQL数据库的相应数据类型,包括char,String,numerictypes,datetime等,并提及了特例如Boolean/Integer和Decimal/BigDecimal的处理。
Java类型和MySQL类型对照表
| mysql | java |
|---|---|
char | String/Byte |
varchar | String |
tinyint(1) | Boolean/Integer |
int | Integer |
bigint | Long |
float | Float |
double | Double |
integer | Integer |
decimal | BigDecimal/Double |
text | String |
datetime | Date |
timestamp | Date/LocalDateTime |
1638
280

被折叠的 条评论
为什么被折叠?