MySQL data types | JAVA data types | JDBC TYPE | normal variable type | Primary key type |
BIGINT | Long | BIGINT | support | support |
TINYINT | Byte | TINYINT | support | not support |
SMALLINT | Short | SMALLINT | support | not support |
MEDIUMINT | Integer | INTEGER | support | support |
INTEGER | Integer | INTEGER | support | support |
INT | Integer | INTEGER | support | support |
FLOAT | Float | REAL | support | not support |
DOUBLE | Double | DOUBLE | support | not support |
DECIMAL | BigDecimal | DECIMAL | support | not support |
NUMERIC | BigDecimal | DECIMAL | support | not support |
CHAR | String | CHAR | support | not support |
VARCHAR | String | VARCHAR | support | not support |
TINYBLOB | DataTypeWithBLOBs.byte[] | BINARY | not support | not support |
TINYTEXT | String | VARCHAR | support | not support |
BLOB | DataTypeWithBLOBs.byte[] | BINARY | not support | not support |
TEXT | DataTypeWithBLOBs.String | LONGVARCHAR | not support | not support |
MEDIUMBLOB | DataTypeWithBLOBs.byte[] | LONGVARBINARY | not support | not support |
MEDIUMTEXT | DataTypeWithBLOBs.String | LONGVARCHAR | not support | not support |
LONGBLOB | DataTypeWithBLOBs.byte[] | LONGVARBINARY | not support | not support |
LONGTEXT | DataTypeWithBLOBs.String | LONGVARCHAR | not support | not support |
DATE | Date | DATE | support | not support |
TIME | Date | TIME | support | not support |
YEAR | Date | DATE | not support | not support |
DATETIME | Date | TIMESTAMP | support | not support |
TIMESTAMP | Date | TIMESTAMP | support | not support |
mysql to jdbc type mapping
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=326502621&siteId=291194637
Recommended
Ranking