https://dev.mysql.com/doc/refman/5.7/en/storage-requirements.html

+----------------------------+----------------------------------------------------+--------------------------------+
| Data Type | Storage Required | Java Type |
+----------------------------+----------------------------------------------------+--------------------------------+
| TINYINT | 1 byte | Byte |
| SMALLINT | 2 bytes | Short |
| MEDIUMINT | 3 bytes | Integer |
| INT, INTEGER | 4 bytes | Integer |
| BIGINT | 8 bytes | Long |
| FLOAT(0-24) | 4 bytes if 0 <= p <= 24 | Float |
| FLOAT(25-53) | 8 bytes if 25 <= p <= 53 | Double |
| FLOAT | 4 bytes | Float |
| DOUBLE(0-8) | 8 bytes | Double |
| REAL | 8 bytes | Double |
| DECIMAL(m,n) | Maximum is 65 for 'm',Maximum is 30 for 'n'. | |
| DECIMAL(1-4,0) | | Short |
| DECIMAL(5-9,0) | | Integer |
| DECIMAL(0,0) | Same as decimal | Long |
| DECIMAL(10-18,0) | | Long |
| DECIMAL(19-65,0) | | BigDecimal |
| DECIMAL(m,1+) | | BigDecimal |
| NUMERIC(m,n) | Same as DECIMAL(m,n) | |
| BIT(n) | approximately (M+7)/8 bytes | Boolean |
+----------------------------+----------------------------------------------------+--------------------------------+

mysql data type <----> java data type (数值)的更多相关文章

  1. Java Data Type

    官方文档:http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html 转载地址:http://blog.csdn.n ...

  2. 服务器返回:type":"Buffer","data":

    接口中返回"type":"Buffer","data":[32,232,175,183,233,151,174,229,177,177,23 ...

  3. The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' registered in the application config file for the ADO.NET provider with invariant name

    可以强迫部署EntityFramework.SqlServer.dll这个文件到输出目录 找到1个老外的帖子,戳这里(本人测试无效,大家有可能试一下..) 解决方案以下: 在EF的上下文代码CS文件( ...

  4. Unable to load type System.Data.Entity.DynamicProxiesXXXXXrequired for deserialization.

    Memcache实例的Get方法时抛出了异常“Unable to load type System.Data.Entity.DynamicProxies.AdInfoItems_19CD09C8E46 ...

  5. VS EF Error: Configuration Error extension=".edmx" type="System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider"

    错误截图: Configuration Error :<add extension=".edmx" type="System.Data.Entity.Design. ...

  6. MVC中异常: An exception of type 'System.Data.ProviderIncompatibleException' occurred in EntityFramework.dll的一种解决办法

    今天在调试MVC的例子的时候,总是出错(An exception of type 'System.Data.ProviderIncompatibleException' occurred in Ent ...

  7. Method 'ExecuteAsync' in type 'System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy' does not have an implementation

    一.错误信息 Entity Framework 6.0数据迁移:Add-Migration XXXX 命令发生错误 System.Reflection.TargetInvocationExceptio ...

  8. org.springframework.dao.InvalidDataAccessApiUsageException: Parameter value [41] did not match expected type [java.lang.Integer (n/a)];

    题记:以前记录过一些自己遇到的BUG,这个行为,让我一看报错的提示信息就能定位到问题的所在,后来记得比较多了,好多是重复性的再加上比较忙就没有详细的记录了,今天的工作量比较小,就顺便记录一下,以便以后 ...

  9. Java 异常 Failed to convert property value of type 'java.lang.String' to required type 'java.util.Date'

    查询时发送给服务器的日期的字符串格式:yyyy-MM-dd HH:mm:ss 服务器接收到日期的字符串之后,向 MySQL 数据库发起查询时,因为没有指定日期时间格式,导致字符串数据不能正确地转换为日 ...

随机推荐

  1. Java笔试面试题整理第四波

    转载至:http://blog.csdn.net/shakespeare001/article/details/51274685 作者:山代王(开心阳) 本系列整理Java相关的笔试面试知识点,其他几 ...

  2. android 开发 Intent使用技巧点

    判断Intent是否为null: if (intent.resolveActivity(getPackageManager())!=null) { //判断Intent是否为null // Inten ...

  3. python tp_ready函数分析

    int PyType_Ready(PyTypeObject *type) { PyObject *dict, *bases; PyTypeObject *base; Py_ssize_t i, n; ...

  4. nginx测试小结

    最近在工作当中需要使用nginx,就对nginx进行进一步的了解,测试.        工作需求是在微服务架构的基础上,客户端通过nginx反向代理访问服务端,确保当一个服务端出现问题时能及时切换到正 ...

  5. ArrayList实现动态数组原理

    addAll方法和申请数组大小函数 public boolean addAll(Collection<? extends E> c) { Object[] a = c.toArray(); ...

  6. Adreno GPU Profiler

    Adreno GPU Profiler,除了UNITY profiler外的一个备选,似乎不能看CPU,内存?

  7. linux 强制删除yum安装的php7.2

    由于支付宝SDK只支持php7.1,因为需要删除之前安装的7.2版,进行降级.通过yum remove不能完全删除php,必须通过rpm方式卸载.由于php安装模块间有依赖,因此需要按顺序进行卸载.如 ...

  8. Linux网络编程学习(六) ----- 管道(第四章)

    1.管道的定义 管道就是将一个程序的输出和另外一个程序的输入连接起来的单向通道,比如命令: ls -l|more,就建立了一个管道,获取ls -l的输出作为more的输入,数据就沿着管道从管道的左边流 ...

  9. Linux网络编程学习(四) -----守护进程的建立(第三章)

    本文介绍一个例程daemon_init() #include <sys/types.h> #include <signal.h> #include <unistd.h&g ...

  10. CSS 盒子投影

    box-shadow 属性可以设置盒子的投影效果.它的原理同文本投影一样.字体风格一节有介绍. 它有4个值,同时使用,也可以有选择地使用: 第一个值 设置阴影左右延伸长度,负值向左,正值向右 第二个值 ...