• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

mysql-java数据映射门类_mysql

mysql 搞代码 7年前 (2018-06-09) 145次浏览 已收录 0个评论

mysqljava数据映射类型

Mysql-Java 数据类型映射

MySQL TypeJava Type
BIT(1) (new in MySQL-5.0)java.lang.Boolean
BIT( > 1) (new in MySQL-5.0)byte[]
TINYINT

java.lang.Boolean if the configuration property tinyInt1isBit is

set to true (the default) and the storage size is 1, or java.lang.Integer if not.

BOOL, BOOLEANSee TINYINT, above as these are aliases for TINYINT(1), currently.
SMALLINT[(M)] [UNSIGNED]java.lang.Integer (regardless of whether it is UNSIGNED or not)
MEDIUMINT[(M)] [UNSIGNED]java.lang.Integer (regardless of whether it is UNSIGNED or not)
INT,INTEGER[(M)] [UNSIGNED]java.lang.Integer, if UNSIGNED java.lang.Long
BIGINT[(M)] [UNSIGNED]java.lang.Long, if UNSIGNED java.math.BigInteger
FLOAT[(M,D)]java.lang.Float
DOUBLE[(M,B)]java.lang.Double
DECIMAL[(M[,D])]java.math.BigDecimal
DATEjava.sql.Date
DATETIMEjava.sql.Timestamp
TIMESTAMP[(M)]java.sql.Timestamp
TIMEjava.sql.Time
YEAR[(2|4)]

If yearIsDateType configuration property is set to false,

then the returned object type is java.sql.Short.

If set to true (the default),

then the returned object is of type java.sql.Date with the date set to January 1st,

at midnight.

CHAR(M)

java.lang.String (unless the character set for the column is BINARY,

then byte[] is returned.

VARCHAR(M) [BINARY]

java.lang.String (unless the character set for the column is BINARY,

then byte[] is returned.

BINARY(M)byte[]
VARBINARY(M)byte[]
TINYBLOBbyte[]
TINYTEXTjava.lang.String
BLOBbyte[]
TEXTjava.lang.String
MEDIUMBLOBbyte[]
MEDIUMTEXTjava.lang.String
LONGBLOBbyte[]
LONGTEXTjava.lang.String
ENUM(‘value1′,’value2’,…)java.lang.String
SET(‘value1′,’value2’,…)java.lang.String

 

欢迎大家阅读mysql-java数据映射门类_mysql》,跪求各位点评,by 搞代码


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:mysql-java数据映射门类_mysql
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址