Mybatis jdbcType 与Oracle、Mysql、java数据类型对应的关系
表格:
jdbcType | Oracle | Mysql | javaType |
---|---|---|---|
ARRAY | ARRAY | ||
BIGINT | BIGINT | long | |
BINARY | byte[] | ||
BIT | BIT | boolean | |
BLOB | BLOB | BLOB | Blob |
BOOLEAN | boolean | ||
CHAR | CHAR | CHAR | String |
CLOB | CLOB | TEXT | Clob |
CURSOR | |||
DATE | DATE | DATE | java.sql.Date |
DECIMAL | DECIMAL | DECIMAL | java.math.BigDecimal |
DOUBLE | NUMBER | DOUBLE | double |
FLOAT | FLOAT | FLOAT | double |
INTEGER | INTEGER | INTEGER | int |
LONG VARBINARY | byte[] | ||
LONG VARCHAR | LONG VARCHAR | String | |
NCHAR | NCHAR | ||
NCLOB | NCLOB | ||
NULL | |||
NUMERIC | NUMERIC/NUMBER | NUMERIC | |
NVARCHAR | |||
OTHER | |||
REAL | REAL | REAL | float |
SMALLINT | SMALLINT | SMALLINT | short |
STRUCT | Struct | ||
TIME | TIME | java.sql.Time | |
TIMESTAMP | TIMESTAMP | TIMESTAMP/DATETIME | java.sql.Timestamp(String也起作用) |
TINYINT | TINYINT | byte | |
UNDEFINED | |||
VARBINARY | byte[] | ||
VARCHAR | VARCHAR | VARCHAR | String |
NUMERIC | java.math.BigDecimal |
参考链接:
文章评论