Numeric Type Attributes
【Numeric Type Attributes】
INT(4)
specifies an INT
with a display width of four digits.
This optional display width may be used by applications to display integer values having a width less than the width specified for the column by left-padding them with spaces. (That is, this width is present in the metadata returned with result sets. Whether it is used or not is up to the application.)
主要是起补0作用。
The display width does not constrain the range of values that can be stored in the column. Nor does it prevent values wider than the column display width from being displayed correctly. For example, a column specified as SMALLINT(3)
has the usual SMALLINT
range of -32768
to32767
, and values outside the range permitted by three digits are displayed in full using more than three digits.
数字位数超过时,正常存储。
When used in conjunction with the optional (nonstandard) attribute ZEROFILL
, the default padding of spaces is replaced with zeros. For example, for a column declared as INT(4) ZEROFILL
, a value of 5
is retrieved as 0005
.
参考:https://dev.mysql.com/doc/refman/5.7/en/numeric-type-attributes.html
Numeric Type Attributes的更多相关文章
- int 4 bytes
http://waynewhitty.ie/blog-post.php?id=19 MySQL - INT(11) vs BIGINT(11) vs TINYINT(11) This seems to ...
- mysql 创建数据库知识总结
表设计 库名.表名.字段名必须使用小写字母,"_"分割,且名称长度不超过12个字符并且要做到见名知意. 建议使用InnoDB存储引擎. 存储精确浮点数必须使用DECIMAL替代FL ...
- 5.24 Declaring Attributes of Functions【转】
转自:https://gcc.gnu.org/onlinedocs/gcc-4.0.0/gcc/Function-Attributes.html 5.24 Declaring Attributes o ...
- [翻译]The Neophyte's Guide to Scala Part 12: Type Classes
The Neophyte's Guide to Scala Part 12: Type Classes 过去的两周我们讨论了一些使我们保持DRY和灵活性的函数式编程技术,特别是函数组合,partial ...
- Standard Numeric Format Strings
The following table describes the standard numeric format specifiers and displays sample output prod ...
- Android Lint Checks
Android Lint Checks Here are the current list of checks that lint performs as of Android Studio 2.3 ...
- Python2.7.6标准库内建函数
Built-in Functions abs() divmod() input() open() staticmethod() all() enumerate() int() ord( ...
- System Error Codes
很明显,以下的文字来自微软MSDN 链接http://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx M ...
- __attribute__
转来的: http://www.cnblogs.com/astwish/p/3460618.html __attribute__ 你知多少? GNU C 的一大特色就是__attribute__ 机制 ...
随机推荐
- web.xml配置重理解
<context-param> <param-name>home-page</param-name> <param-value>home.jsp< ...
- python2.7与3.5版本中:编码格式及编码转换
主要说明编码之间的转换方法 2.7版本: 1 # -*- coding:utf-8 -*- 2 a = "迪丽热巴" 3 a_unicode = a.decode("ut ...
- linux inode 详解 / 线上inode爆满解决方案
本文大量参考阮一峰大神博客,整理笔记 之所以写inode文章是由于一次线上问题,引发对inode深入的思考. 磁盘的inode监控与磁盘空间的监控同等重要,线上服务器一定要做好磁盘inode与磁盘空间 ...
- eclipse中jdk源码调试步骤
分析源码是学习一项技术内幕最有效的手段.由于正常的引入JAr包源码没法进行对源码打断点,想要深入了解源码不方便.下面就开始介绍源码调试的步骤. 1.在eclipse新建一个JAVA项目compare_ ...
- delphi 控件编辑器
控件编辑器和属性编辑器类似 http://www.rgzz.sdedu.net/ebook/hdbook/computer/bc/delphizhuanti/rmjq/028.htm TCommonD ...
- 浅谈JSONObject与JSONArray的区别
例如:一个json字符串如下: { "type":[{"a","1"},{"a","2"},{&qu ...
- AIR程序调用本地默认应用程序打开本地文件
当我用下面语句的时候,可以成功打开桌面文件夹下面的文件: var file:File = File.desktopDirectory.resolvePath("test.jpg") ...
- elasticsearch-java异常
1. Unsupported major.minor version 52.0 java的jdk版本过低导致,需要更换为jdk1.8+ 2. elasticsearch 的version在pom中提示 ...
- sizeof 空类
C++标准规定类的大小不为0,空类的大小为1,当类不包含虚函数和非静态数据成员时,其对象大小也为1. 如果在类中声明了虚函数(不管是1个还是多个),那么在实例化对象时,编译器会自动在对象里安插一个指针 ...
- Runloop原理
简单的说,runloop是一个事件循环的机制,同时能够保活线程.iOS中每个线程都对应一个runloop,主线程的runloop默认开启,其他线程的runloop默认关闭,线程与runloop是一一对 ...