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__ 机制 ...
随机推荐
- spring揭密学习笔记
spring揭密学习笔记 spring揭密学习笔记(1) --spring的由来 spring揭密学习笔记(2)-spring ioc容器:IOC的基本概念
- Python: 对CSV文件读写 和 Md5加密
1. python 有专门的csv包,直接导入即可. import csv: 2. 直接使用普通文件的open方法 csv_reader=open("e:/python/csv_data/l ...
- poi excel 设置边框字体行高行宽
final HSSFSheet sheet = wb.createSheet(sheetName + "_" + n); System.out.println("s ...
- centos磁盘空间重新分配
将/home目录压缩一部分空间到/ ref: https://serverfault.com/a/811124/434124 https://stackoverflow.com/a/19969471/ ...
- 通过SSH克隆远程仓库(GitLab)到本地
由于不是任何用户都能从远程仓库克隆到本地的,也是需要鉴别的,因此本地需要用git bash 创建一个公钥,而远程仓库也要把这个公钥保存下来,进而本地才可以从远程download.主要步骤如下: 1.首 ...
- Dockerfile构建MySQL
转自:https://www.cnblogs.com/jsonhc/p/7807931.html 利用Dockerfile自定义构建MySQL服务折腾了几天,一直在启动服务上出现错误,现在终于解决了该 ...
- TypeScript set get
private _id:number; public get id():number{ return this._id; } public set id(value:number){ this._id ...
- 在page cache中的页,如果当时没有进程read或者write,引用计数到底该为多少
在一次偶然的机会,在研究如何降低pagecache占用的过程中,走查了 invalidate_mapping_pages的代码: 通过调用 __pagevec_lookup 在radix树中收集一部分 ...
- vue项目遇到的坑
一.启动项目问题 1. 如何从git上拉下项目:点我 2. 启动项目失败: 点我 and 点我 二.搭建项目问题 1. 先改分辨率,否则可能影响布局 以我的项目为例,分辨率修改位置如下: 2. .v ...
- 遍历DOM树,获取子节点
获取子节点的方法有: 方法 说明 children() 选取子节点,可以带过滤参数.但只能选择子节点,不能选择孙子节点. find() 选取子节点,可以带过滤参数.可以选择子节点及孙子节点 ...