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的更多相关文章

  1. int 4 bytes

    http://waynewhitty.ie/blog-post.php?id=19 MySQL - INT(11) vs BIGINT(11) vs TINYINT(11) This seems to ...

  2. mysql 创建数据库知识总结

    表设计 库名.表名.字段名必须使用小写字母,"_"分割,且名称长度不超过12个字符并且要做到见名知意. 建议使用InnoDB存储引擎. 存储精确浮点数必须使用DECIMAL替代FL ...

  3. 5.24 Declaring Attributes of Functions【转】

    转自:https://gcc.gnu.org/onlinedocs/gcc-4.0.0/gcc/Function-Attributes.html 5.24 Declaring Attributes o ...

  4. [翻译]The Neophyte's Guide to Scala Part 12: Type Classes

    The Neophyte's Guide to Scala Part 12: Type Classes 过去的两周我们讨论了一些使我们保持DRY和灵活性的函数式编程技术,特别是函数组合,partial ...

  5. Standard Numeric Format Strings

    The following table describes the standard numeric format specifiers and displays sample output prod ...

  6. Android Lint Checks

    Android Lint Checks Here are the current list of checks that lint performs as of Android Studio 2.3 ...

  7. Python2.7.6标准库内建函数

        Built-in Functions     abs() divmod() input() open() staticmethod() all() enumerate() int() ord( ...

  8. System Error Codes

    很明显,以下的文字来自微软MSDN 链接http://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx M ...

  9. __attribute__

    转来的: http://www.cnblogs.com/astwish/p/3460618.html __attribute__ 你知多少? GNU C 的一大特色就是__attribute__ 机制 ...

随机推荐

  1. 推荐算法 pd

    from django.db import connection select_sql = 'select * from model' datas = pd.read_sql(select_sql, ...

  2. python-html-百度云音视频点播服务

    加密的视频: 一:python后端需要生成token token计算规则 名词解释: userId: 百度云用户唯一标识,可在百度云管理控制台账号基本信息中得到,32位字符串. userKey:用户密 ...

  3. 使用Shiro登录成功后,跳转到之前访问的页面实现

    转:http://blog.csdn.net/lhacker/article/details/20450855 很多时候,我们需要做到,当用户登录成功后,跳转回登录前的页面.如果用户是点击" ...

  4. markdown的试用

    因为markdown,我接触到latex,因为latex,我花了几个月去看相关的书籍 我看了以下相关的资料 1.<LaTeX入门> 刘海洋 2.英文 TeX - LaTeX Stack E ...

  5. RAD Tokyo 10.2.2

    TDialogService类 如果您是使用比较新的RAD Studio版本. 那么您应该开始改用FMX.DialogService程序单元中TDialogService类别的类别方法来取代以前的Me ...

  6. matplot读取文本文件画图

    # -*- coding: utf-8 -*- """ Created on Fri Sep 7 18:38:35 2018 @author: manuel " ...

  7. python 阿狸的进阶之路(6)

    常用模块 json # 序列化 #将内存的数据存到硬盘中,中间的格式,可以被多种语言识别,跨平台交互数据 #json 可以将字典之类的数据类型存到字典中 import json dic = {&quo ...

  8. greenplum

    参考文章:在linux系统上安装Greenplum数据库  https://blog.csdn.net/mingli_a/article/details/78779189 Greenplum安装步骤  ...

  9. zookeeper windows7下集群搭建

    模拟分布式环境!!!  搞了好几天,各种错误!!终于成功了. 环境: windows7 /centos/xsheel    安装了三个虚拟机... 1.下载zookeeper http://archi ...

  10. es6 初级之let

    1.在es6 中,定义变量使用 let. 1.1 var定义变量: <!DOCTYPE html> <html lang="en"> <head> ...